Part Number Hot Search : 
2N722510 MC74ACT A1S109 50150 VTT7123 FN4668 XC6405A E180CA
Product Description
Full Text Search
 

To Download NG80386SXLP33 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  * other brands and names are the property of their respective owners. information in this document is provided in connection with intel products. intel assumes no liability whatsoever, including infringement of any patent or copyright, for sale and use of intel products except as provided in intel's terms and conditions of sale for such products. intel retains the right to make changes to these specifications at any time, without notice. microcomputer products may have minor variations to this specification known as errata. january 1994 copyright ? intel corporation, 1995 order number: 240187-008 intel386 tm sx microprocessor y full 32-bit internal architecture e 8-, 16-, 32-bit data types e 8 general purpose 32-bit registers y runs intel386 tm software in a cost effective 16-bit hardware environment e runs same applications and o.s.'s as the intel386 tm dx processor e object code compatible with 8086, 80186, 80286, and intel386 tm processors y high performance 16-bit data bus e 16, 20, 25 and 33 mhz clock e two-clock bus cycles e address pipelining allows use of slower/cheaper memories y integrated memory management unit e virtual memory support e optional on-chip paging e 4 levels of hardware enforced protection e mmu fully compatible with those of the 80286 and intel386 dx cpus y virtual 8086 mode allows execution of 8086 software in a protected and paged system y large uniform address space e 16 megabyte physical e 64 terabyte virtual e 4 gigabyte maximum segment size y numerics support with the intel387 tm sx math coprocessor y on-chip debugging support including breakpoint registers y complete system development support e software: c, pl/m, assembler e debuggers: pmon-386 dx, ice tm -386 sx y high speed chmos iv technology y operating frequency: e standard (intel386 sx -33, -25, -20, -16) min/max frequency (4/33, 4/25, 4/20, 4/16) mhz e low power (intel386 sx -33, -25, -20, -16, -12) min/max frequency (2/33, 2/25, 2/20, 2/16, 2/12) mhz y 100-pin plastic quad flatpack package (see packaging outlines and dimensions y 231369) the intel386 tm sx microprocessor is an entry-level 32-bit cpu with a 16-bit external data bus and a 24-bit external address bus. the intel386 sx cpu brings the vast software library of the intel386 tm architecture to entry-level systems. it provides the performance benefits of a 32-bit programming architecture with the cost savings associated with 16-bit hardware systems. 240187 47 intel386 tm sx pipelined 32-bit microarchitecture
intel386 tm sx microprocessor intel386 tm sx microprocessor contents page 1.0 pin description 3 2.0 base architecture 6 2.1 register set 6 2.2 instruction set 10 2.3 memory organization 11 2.4 addressing modes 12 2.5 data types 15 2.6 i/o space 15 2.7 interrupts and exceptions 17 2.8 reset and initialization 20 2.9 testability 20 2.10 debugging support 21 3.0 real mode architecture 22 3.1 memory addressing 22 3.2 reserved locations 23 3.3 interrupts 23 3.4 shutdown and halt 23 3.5 lock operations 23 4.0 protected mode architecture 24 4.1 addressing mechanism 24 4.2 segmentation 24 4.3 protection 29 4.4 paging 33 4.5 virtual 8086 environment 36 contents page 5.0 functional data 39 5.1 signal description overview 39 5.2 bus transfer mechanism 45 5.3 memory and i/o spaces 45 5.4 bus functional description 45 5.5 self-test signature 63 5.6 component and revision identifiers 63 5.7 coprocessor interfacing 63 6.0 package thermal specifications 64 7.0 electrical specifications 64 7.1 power and grounding 64 7.2 maximum ratings 65 7.3 d.c. specifications 66 7.4 a.c. specifications 68 7.5 designing for ice tm -intel386 sx emulator 78 8.0 differences between the intel386 tm sx cpu and the intel386 tm dx cpu 79 9.0 instruction set 80 9.1 intel386 tm sx cpu instruction encoding and clock count summary 80 9.2 instruction encoding 95 2
intel386 tm sx microprocessor 1.0 pin description 240187 1 note: nc e no connect figure 1.1. intel386 tm sx microprocessor pin out top view table 1.1. alphabetical pin assignments address data control n/c v cc v ss a 1 18 d 0 1 ads y 16 20 8 2 a 2 51 d 1 100 bhe y 19 27 9 5 a 3 52 d 2 99 ble y 17 29 10 11 a 4 53 d 3 96 busy y 34 30 21 12 a 5 54 d 4 95 clk2 15 31 32 13 a 6 55 d 5 94 d/c y 24 43 39 14 a 7 56 d 6 93 error y 36 44 42 22 a 8 58 d 7 92 flt y 28 45 48 35 a 9 59 d 8 90 hlda 3 46 57 41 a 10 60 d 9 89 hold 4 47 69 49 a 11 61 d 10 88 intr 40 71 50 a 12 62 d 11 87 lock y 26 84 63 a 13 64 d 12 86 m/io y 23 91 67 a 14 65 d 13 83 na y 69768 a 15 66 d 14 82 nmi 38 77 a 16 70 d 15 81 pereq 37 78 a 17 72 ready y 785 a 18 73 reset 33 98 a 19 74 w/r y 25 a 20 75 a 21 76 a 22 79 a 23 80 3
intel386 tm sx microprocessor 1.0 pin description (continued) the following are the intel386 tm sx microprocessor pin descriptions. the following definitions are used in the pin descriptions: y the named signal is active low. i input signal. o output signal. i/o input and output signal. - no electrical connection. symbol type pin name and function clk2 i 15 clk2 provides the fundamental timing for the intel386 sx microprocessor. for additional information see clock. reset i 33 reset suspends any operation in progress and places the intel386 sx microprocessor in a known reset state. see interrupt signals for additional information. d 15 d 0 i/o 81-83,86-90, data bus inputs data during memory, i/o and interrupt acknowledge read cycles and outputs data during memory and 92-96,99-100,1 i/o write cycles. see data bus for additional information. a 23 a 1 o 80-79,76-72,70, address bus outputs physical memory or port i/o addresses. see address bus for additional information. 66-64,62-58, 56-51,18 w/r y o25 write/read is a bus cycle definition pin that distinguishes write cycles from read cycles. see bus cycle definition signals for additional information. d/c y o24 data/control is a bus cycle definition pin that distinguishes data cycles, either memory or i/o, from control cycles which are: interrupt acknowledge, halt, and code fetch. see bus cycle definition signals for additional information. m/io y o23 memory/io is a bus cycle definition pin that distinguishes memory cycles from input/output cycles. see bus cycle definition signals for additional information. lock y o26 bus lock is a bus cycle definition pin that indicates that other system bus masters are not to gain control of the system bus while it is active. see bus cycle definition signals for additional information. ads y o16 address status indicates that a valid bus cycle definition and address (w/r y , d/c y , m/io y , bhe y , ble y and a 23 a 1 are being driven at the intel386 sx microprocessor pins. see bus control signals for additional information. na y i6 next address is used to request address pipelining. see bus control signals for additional information. ready y i7 bus ready terminates the bus cycle. see bus control signals for additional information. bhe y , ble y o 19,17 byte enables indicate which data bytes of the data bus take part in a bus cycle. see address bus for additional information. 4
intel386 tm sx microprocessor 1.0 pin description (continued) symbol type pin name and function hold i 4 bus hold request input allows another bus master to request control of the local bus. see bus arbitration signals for additional information. hlda o 3 bus hold acknowledge output indicates that the intel386 sx microprocessor has surrendered control of its local bus to another bus master. see bus arbitration signals for additional information. intr i 40 interrupt request is a maskable input that signals the intel386 sx microprocessor to suspend execution of the current program and execute an interrupt acknowledge function. see interrupt signals for additional information. nmi i 38 non-maskable interrupt request is a non-maskable input that signals the intel386 sx microprocessor to suspend execution of the current program and execute an interrupt acknowledge function. see interrupt signals for additional information. busy y i34 busy signals a busy condition from a processor extension. see coprocessor interface signals for additional information. error y i36 error signals an error condition from a processor extension. see coprocessor interface signals for additional information. pereq i 37 processor extension request indicates that the processor has data to be transferred by the intel386 sx microprocessor. see coprocessor interface signals for additional information. flt y i28 float is an input which forces all bidirectional and output signals, including hlda, to the tri-state condition. this allows the electrically isolated intel386sx pqfp to use once (on-circuit emulation) method without removing it from the pcb. see float for additional information. n/c - 20, 27, 29-31, 43-47 no connects should always be left unconnected. connection of a n/c pin may cause the processor to malfunction or be incompatible with future steppings of the intel386 sx microprocessor. v cc i 8-10,21,32,39 system power provides the a 5v nominal dc supply input. 42,48,57,69, 71,84,91,97 v ss i 2,5,11-14,22 system ground provides the 0v connection from which all inputs and outputs are measured. 35,41,49-50, 63,67-68, 77-78,85,98 5
intel386 tm sx microprocessor introduction the intel386 sx microprocessor is 100% object code compatible with the intel386 dx, 286 and 8086 microprocessors. systems based on the intel386 sx cpu can access the world's largest existing micro- computer software base, including the growing 32- bit software base. instruction pipelining and a high performance alu ensure short average instruction execution times and high system throughput. the integrated memory management unit (mmu) in- cludes an address translation cache, multi-tasking hardware, and a four-level hardware-enforced pro- tection mechanism to support operating systems. the virtual machine capability of the intel386 sx cpu allows simultaneous execution of applications from multiple operating systems. the intel386 sx cpu offers on-chip testability and debugging features. four breakpoint registers allow conditional or unconditional breakpoint traps on code execution or data accesses for powerful de- bugging of even rom-based systems. other testa- bility features include self-test, tri-state of output buffers, and direct access to the page translation cache. the low power intel386 sx cpu brings the benefits of the intel386 microprocessor 32-bit architecture to laptop and notebook personal computer applica- tions. with its power saving 2 mhz sleep-mode and extended functional temperature range of 0 cto 100 ct case , the lower power intel386 sx cpu specifically satisfies the power consumption and heat dissipation requirements of today's small form factor computers. 2.0 base architecture the intel386 sx microprocessor consists of a cen- tral processing unit, a memory management unit and a bus interface. the central processing unit consists of the execu- tion unit and the instruction unit. the execution unit contains the eight 32-bit general purpose registers which are used for both address calculation and data operations and a 64-bit barrel shifter used to speed shift, rotate, multiply, and divide operations. the instruction unit decodes the instruction opcodes and stores them in the decoded instruction queue for immediate use by the execution unit. the memory management unit (mmu) consists of a segmentation unit and a paging unit. segmentation allows the managing of the logical address space by providing an extra addressing component, one that allows easy code and data relocatability, and effi- cient sharing. the paging mechanism operates be- neath and is transparent to the segmentation pro- cess, to allow management of the physical address space. the segmentation unit provides four levels of pro- tection for isolating and protecting applications and the operating system from each other. the hardware enforced protection allows the design of systems with a high degree of integrity. the intel386 sx microprocessor has two modes of operation: real address mode (real mode), and protected virtual address mode (protected mode). in real mode the intel386 sx microprocessor oper- ates as a very fast 8086, but with 32-bit extensions if desired. real mode is required primarily to set up the processor for protected mode operation. within protected mode, software can perform a task switch to enter into tasks designated as virtual 8086 mode tasks. each such task behaves with 8086 se- mantics, thus allowing 8086 software (an application program or an entire operating system) to execute. the virtual 8086 tasks can be isolated and protect- ed from one another and the host intel386 sx micro- processor operating system by use of paging. finally, to facilitate system hardware designs, the intel386 sx microprocessor bus interface offers ad- dress pipelining and direct byte enable signals for each byte of the data bus. 2.1 register set the intel386 sx microprocessor has thirty-four reg- isters as shown in figure 2-1. these registers are grouped into the following seven categories: general purpose registers: the eight 32-bit gen- eral purpose registers are used to contain arithmetic and logical operands. four of these (eax, ebx, ecx, and edx) can be used either in their entirety as 32-bit registers, as 16-bit registers, or split into pairs of separate 8-bit registers. 6
intel386 tm sx microprocessor 240187 2 figure 2.1. intel386 tm sx microprocessor registers 7
intel386 tm sx microprocessor segment registers: six 16-bit special purpose reg- isters select, at any given time, the segments of memory that are immediately addressable for code, stack, and data. flags and instruction pointer registers: the two 32-bit special purpose registers in figure 2.1 record or control certain aspects of the intel386 sx micro- processor state. the eflags register includes status and control bits that are used to reflect the outcome of many instructions and modify the se- mantics of some instructions. the instruction point- er, called eip, is 32 bits wide. the instruction pointer controls instruction fetching and the processor auto- matically increments it after executing an instruction. control registers: the four 32-bit control register are used to control the global nature of the intel386 sx microprocessor. the cr0 register contains bits that set the different processor modes (protected, real, paging and coprocessor emulation). cr2 and cr3 registers are used in the paging operation. system address registers: these four special registers reference the tables or segments support- ed by the 80286/intel386 sx/intel386 dx cpu's protection model. these tables or segments are: gdtr (global descriptor table register), idtr (interrupt descriptor table register), ldtr (local descriptor table register), tr (task state segment register). debug registers: the six programmer accessible debug registers provide on-chip support for debug- ging. the use of the debug registers is described in section 2.10 debugging support . test registers: two registers are used to control the testing of the ram/cam (content addressable memories) in the translation lookaside buffer por- tion of the intel386 sx microprocessor. their use is discussed in testability . 240187 3 figure 2.2. status and control register bit functions 8
intel386 tm sx microprocessor eflags register the flag register is a 32-bit register named eflags. the defined bits and bit fields within eflags, shown in figure 2.2, control certain operations and indicate the status of the intel386 sx microproces- sor. the lower 16 bits (bits 0 15) of eflags con- tain the 16-bit flag register named flags. this is the default flag register used when executing 8086, 80286, or real mode code. the functions of the flag bits are given in table 2.1. control registers the intel386 sx microprocessor has three control registers of 32 bits, cr0, cr2 and cr3, to hold the machine state of a global nature. these registers are shown in figures 2.1 and 2.2. the defined cr0 bits are described in table 2.2. table 2.1. flag definitions bit position name function 0 cf carry flageset on high-order bit carry or borrow; cleared otherwise. 2 pf parity flageset if low-order 8 bits of result contain an even number of 1-bits; cleared otherwise. 4 af auxiliary carry flageset on carry from or borrow to the low order four bits of al; cleared otherwise. 6 zf zero flageset if result is zero; cleared otherwise. 7 sf sign flageset equal to high-order bit of result (0 if positive, 1 if negative). 8 tf single step flageonce set, a single step interrupt occurs after the next instruction executes. tf is cleared by the single step interrupt. 9 if interrupt-enable flagewhen set, maskable interrupts will cause the cpu to transfer control to an interrupt vector specified location. 10 df direction flagecauses string instructions to auto-increment (default) the appropriate index registers when cleared. setting df causes auto-decrement. 11 of overflow flageset if the operation resulted in a carry/borrow into the sign bit (high-order bit) of the result but did not result in a carry/borrow out of the high-order bit or vice-versa. 12,13 iopl i/o privilege leveleindicates the maximum current privilege level (cpl) permitted to execute i/o instructions without generating an exception 13 fault or consulting the i/o permission bit map while executing in protected mode. for virtual 86 mode it indicates the maximum cpl allowing alteration of the if bit. see section 4.2 for a further discussion and definitions on various privilege levels. 14 nt nested taskeset if the execution of the current task is nested within another task. cleared otherwise. 16 rf resume flageused in conjunction with debug register breakpoints. it is checked at instruction boundaries before breakpoint processing. if set, any debug fault is ignored on the next instruction. 17 vm virtual 8086 modeeif set while in protected mode, the intel386 sx microprocessor will switch to virtual 8086 operation, handling segment loads as the 8086 does, but generating exception 13 faults on privileged opcodes. 9
intel386 tm sx microprocessor table 2.2. cr0 definitions bit position name function 0 pe protection mode enableeplaces the intel386 sx microprocessor into protected mode. if pe is reset, the processor operates again in real mode. pe may be set by loading msw or cr0. pe can be reset only by loading cr0, it cannot be reset by the lmsw instruction. 1 mp monitor coprocessor extensioneallows wait instructions to cause a processor extension not present exception (number 7). 2 em emulate processor extensionecauses a processor extension not present exception (number 7) on esc instructions to allow emulating a processor extension. 3 ts task switchedeindicates the next instruction using a processor extension will cause exception 7, allowing software to test whether the current processor extension context belongs to the current task. 31 pg paging enable biteis set to enable the on-chip paging unit. it is reset to disable the on-chip paging unit. 2.2 instruction set the instruction set is divided into nine categories of operations: data transfer arithmetic shift/rotate string manipulation bit manipulation control transfer high level language support operating system support processor control these instructions are listed in table 9.1 instruc- tion set clock count summary . all intel386 sx microprocessor instructions operate on either 0, 1, 2 or 3 operands; an operand resides in a register, in the instruction itself, or in memory. most zero operand instructions (e.g cli, sti) take only one byte. one operand instructions generally are two bytes long. the average instruction is 3.2 bytes long. since the intel386 sx microprocessor has a 16 byte prefetch instruction queue, an average of 5 instructions will be prefetched. the use of two operands permits the following types of common in- structions: register to register memory to register immediate to register memory to memory register to memory immediate to memory. the operands can be either 8, 16, or 32 bits long. as a general rule, when executing code written for the intel386 sx microprocessor (32-bit code), operands are 8 or 32 bits; when executing existing 8086 or 80286 code (16-bit code), operands are 8 or 16 bits. prefixes can be added to all instructions which over- ride the default length of the operands (i.e. use 32-bit operands for 16-bit code, or 16-bit operands for 32-bit code). 10
intel386 tm sx microprocessor 2.3 memory organization memory on the intel386 sx microprocessor is divid- ed into 8-bit quantities (bytes), 16-bit quantities (words), and 32-bit quantities (dwords). words are stored in two consecutive bytes in memory with the low-order byte at the lowest address. dwords are stored in four consecutive bytes in memory with the low-order byte at the lowest address. the address of a word or dword is the byte address of the low-order byte. in addition to these basic data types, the intel386 sx microprocessor supports two larger units of memory: pages and segments. memory can be divided up into one or more variable length segments, which can be swapped to disk or shared between pro- grams. memory can also be organized into one or more 4k byte pages. finally, both segmentation and paging can be combined, gaining the advantages of both systems. the intel386 sx microprocessor sup- ports both pages and segmentation in order to pro- vide maximum flexibility to the system designer. segmentation and paging are complementary. seg- mentation is useful for organizing memory in logical modules, and as such is a tool for the application programmer, while pages are useful to the system programmer for managing the physical memory of a system. address spaces the intel386 sx microprocessor has three types of address spaces: logical , linear , and physical .a logical address (also known as a virtual address) consists of a selector and an offset. a selector is the contents of a segment register. an offset is formed by summing all of the addressing components (base, index, displacement), discussed in sec- tion 2.4 addressing modes , into an effective ad- dress. this effective address along with the selector is known as the logical address. since each task on the intel386 sx microprocessor has a maximum of 16k (2 14 b 1) selectors, and offsets can be 4 giga- bytes (with paging enabled) this gives a total of 2 46 bits, or 64 terabytes, of logical address space per task. the programmer sees the logical address space. the segmentation unit translates the logical ad- dress space into a 32-bit linear address space. if the paging unit is not enabled then the 32-bit linear ad- dress is truncated into a 24-bit physical address. the physical address is what appears on the ad- dress pins. the primary differences between real mode and protected mode are how the segmentation unit per- forms the translation of the logical address into the linear address, size of the address space, and pag- ing capability. in real mode, the segmentation unit shifts the selector left four bits and adds the result to the effective address to form the linear address. this linear address is limited to 1 megabyte. in addi- tion, real mode has no paging capability. protected mode will see one of two different ad- dress spaces, depending on whether or not paging is enabled. every selector has a logical base ad- dress associated with it that can be up to 32 bits in length. this 32-bit logical base address is added to the effective address to form a final 32-bit linear address. if paging is disabled this final linear ad- dress reflects physical memory and is truncated so that only the lower 24 bits of this address are used to address the 16 megabyte memory address space. if paging is enabled this final linear address reflects a 32-bit address that is translated through the pag- ing unit to form a 16-megabyte physical address. the logical base address is stored in one of two operating system tables (i.e. the local descriptor table or global descriptor table). figure 2.3 shows the relationship between the vari- ous address spaces. 11
intel386 tm sx microprocessor 240187 4 figure 2.3. address translation segment register usage the main data structure used to organize memory is the segment. on the intel386 sx microprocessor, segments are variable sized blocks of linear ad- dresses which have certain attributes associated with them. there are two main types of segments, code and data. the segments are of variable size and can be as small as 1 byte or as large as 4 giga- bytes (2 32 bits). in order to provide compact instruction encoding and increase processor performance, instructions do not need to explicitly specify which segment reg- ister is used. the segment register is automatically chosen according to the rules of table 2.3 (segment register selection rules). in general, data refer- ences use the selector contained in the ds register, stack references use the ss register and instruction fetches use the cs register. the contents of the in- struction pointer provide the offset. special segment override prefixes allow the explicit use of a given segment register, and override the implicit rules list- ed in table 2.3. the override prefixes also allow the use of the es, fs and gs segment registers. there are no restrictions regarding the overlapping of the base addresses of any segments. thus, all 6 segments could have the base address set to zero and create a system with a four gigabyte linear ad- dress space. this creates a system where the virtual address space is the same as the linear address space. further details of segmentation are dis- cussed in chapter 4 protected mode archi- tecture . 2.4 addressing modes the intel386 sx microprocessor provides a total of 8 addressing modes for instructions to specify oper- ands. the addressing modes are optimized to allow the efficient execution of high level languages such as c and fortran, and they cover the vast majori- ty of data references needed by high-level lan- guages. register and immediate modes two of the addressing modes provide for instruc- tions that operate on register or immediate oper- ands: register operand mode: the operand is located in one of the 8, 16 or 32-bit general registers. immediate operand mode: the operand is includ- ed in the instruction as part of the opcode. 12
intel386 tm sx microprocessor table 2.3. segment register selection rules type of implied (default) segment override memory reference segment use prefixes possible code fetch cs none destination of push, pushf, int, call, pusha instructons ss none source of pop, popa, popf, iret, ret instructions ss none destination of stos, move, rep stos, and rep movs instructions es none other data references, with effective address using base register of: [ eax ] ds cs,ss,es,fs,gs [ ebx ] ds cs,ss,es,fs,gs [ ecx ] ds cs,ss,es,fs,gs [ edx ] ds cs,ss,es,fs,gs [ esi ] ds cs,ss,es,fs,gs [ edi ] ds cs,ss,es,fs,gs [ ebp ] ss cs,ds,es,fs,gs [ esp ] ss cs,ds,es,fs,gs 32-bit memory addressing modes the remaining 6 modes provide a mechanism for specifying the effective address of an operand. the linear address consists of two components: the seg- ment base address and an effective address. the effective address is calculated by summing any combination of the following three address elements (see figure 2.3): displacement: an 8, 16 or 32-bit immediate val- ue, following the instruction. base: the contents of any general purpose regis- ter. the base registers are generally used by compil- ers to point to the start of the local variable area. index: the contents of any general purpose regis- ter except for esp. the index registers are used to access the elements of an array, or a string of char- acters. the index register's value can be multiplied by a scale factor, either 1, 2, 4 or 8. the scaled index is especially useful for accessing arrays or struc- tures. combinations of these 3 components make up the 6 additional addressing modes. there is no perform- ance penalty for using any of these addressing com- binations, since the effective address calculation is pipelined with the execution of other instructions. the one exception is the simultaneous use of base and index components which requires one addition- al clock. as shown in figure 2.4, the effective address (ea) of an operand is calculated according to the following formula: ea e base register a (index register * scaling) a displacement 1. direct mode: the operand's offset is contained as part of the instruction as an 8, 16 or 32-bit displacement. 2. register indirect mode: a base register con- tains the address of the operand. 3. based mode: a base register's contents are added to a displacement to form the oper- and's offset. 4. scaled index mode: an index register's con- tents are multiplied by a scaling factor, and the result is added to a displacement to form the operand's offset. 5. based scaled index mode: the contents of an index register are multiplied by a scaling fac- tor, and the result is added to the contents of a base register to obtain the operand's offset. 6. based scaled index mode with displacement: the contents of an index register are multiplied by a scaling factor, and the result is added to the contents of a base register and a displace- ment to form the operand's offset. 13
intel386 tm sx microprocessor 240187 5 figure 2.4. addressing mode calculations differences between 16 and 32 bit addresses in order to provide software compatibility with the 8086 and the 80286, the intel386 sx microproces- sor can execute 16-bit instructions in real and pro- tected modes. the processor determines the size of the instructions it is executing by examining the d bit in a segment descriptor. if the d bit is 0 then all operand lengths and effective addresses are as- sumed to be 16 bits long. if the d bit is 1 then the default length for operands and addresses is 32 bits. in real mode the default size for operands and ad- dresses is 16 bits. regardless of the default precision of the operands or addresses, the intel386 sx microprocessor is able to execute either 16 or 32-bit instructions. this is specified through the use of override prefixes. two prefixes, the operand length prefix and the address length prefix , override the value of the d bit on an individual instruction basis. these prefixes are automatically added by assemblers. the operand length and address length prefixes can be applied separately or in combination to any instruction. the address length prefix does not al- low addresses over 64k bytes to be accessed in real mode. a memory address which exceeds 0ffffh will result in a general protection fault. an address length prefix only allows the use of the ad- ditional intel386 sx microprocessor addressing modes. when executing 32-bit code, the intel386 sx micro- processor uses either 8 or 32-bit displacements, and any register can be used as base or index registers. when executing 16-bit code, the displacements are either 8 or 16-bits, and the base and index register conform to the 80286 model. table 2.4 illustrates the differences. 14
intel386 tm sx microprocessor table 2.4. base and index registers for 16- and 32-bit addresses 16-bit addressing 32-bit addressing base register bx,bp any 32-bit gp register index register si,di any 32-bit gp register except esp scale factor none 1, 2, 4, 8 displacement 0, 8, 16-bits 0, 8, 32-bits 2.5 data types the intel386 sx microprocessor supports all of the data types commonly used in high level languages: bit: a single bit quantity. bit field: a group of up to 32 contiguous bits, which spans a maximum of four bytes. bit string: a set of contiguous bits; on the intel386 sx microprocessor, bit strings can be up to 4 giga- bits long. byte: a signed 8-bit quantity. unsigned byte: an unsigned 8-bit quantity. integer (word): a signed 16-bit quantity. long integer (double word): a signed 32-bit quan- tity. all operations assume a 2's complement repre- sentation. unsigned integer (word): an unsigned 16-bit quantity. unsigned long integer (double word): an un- signed 32-bit quantity. signed quad word: a signed 64-bit quantity. unsigned quad word: an unsigned 64-bit quantity. pointer: a 16 or 32-bit offset-only quantity which in- directly references another memory location. long pointer: a full pointer which consists of a 16- bit segment selector and either a 16 or 32-bit offset. char: a byte representation of an ascii alphanu- meric or control character. string: a contiguous sequence of bytes, words or dwords. a string may contain between 1 byte and 4 gigabytes. bcd: a byte (unpacked) representation of decimal digits 0 9. packed bcd: a byte (packed) representation of two decimal digits 0 9 storing one digit in each nibble. when the intel386 sx microprocessor is coupled with its numerics coprocessor, the intel387 sx, then the following common floating point types are sup- ported: floating point: a signed 32, 64, or 80-bit real num- ber representation. floating point numbers are sup- ported by the intel387 sx numerics coprocessor. figure 2.5 illustrates the data types supported by the intel386 sx microprocessor and the intel387 sx. 2.6 i/o space the intel386 sx microprocessor has two distinct physical address spaces: physical memory and i/o. generally, peripherals are placed in i/o space al- though the intel386 sx microprocessor also sup- ports memory-mapped peripherals. the i/o space consists of 64k bytes which can be divided into 64k 8-bit ports or 32k 16-bit ports, or any combination of ports which add up to no more than 64k bytes. the 64k i/o address space refers to physical addresses rather than linear addresses since i/o instructions do not go through the segmentation or paging hard- ware. the m/io y pin acts as an additional address line, thus allowing the system designer to easily de- termine which address space the processor is ac- cessing. the i/o ports are accessed by the in and out in- structions, with the port address supplied as an im- mediate 8-bit constant in the instruction or in the dx register. all 8-bit and 16-bit port addresses are zero extended on the upper address lines. the i/o in- structions cause the m/io y pin to be driven low. i/o port addresses 00f8h through 00ffh are re- served for use by intel. 15
intel386 tm sx microprocessor 240187 6 figure 2.5. intel386 tm sx microprocessor supported data types 16
intel386 tm sx microprocessor 2.7 interrupts and exceptions interrupts and exceptions alter the normal program flow in order to handle external events, report errors or exceptional conditions. the difference between interrupts and exceptions is that interrupts are used to handle asynchronous external events while ex- ceptions handle instruction faults. although a pro- gram can generate a software interrupt via an int n instruction, the processor treats software interrupts as exceptions. hardware interrupts occur as the result of an exter- nal event and are classified into two types: maskable or non-maskable. interrupts are serviced after the execution of the current instruction. after the inter- rupt handler is finished servicing the interrupt, exe- cution proceeds with the instruction immediately after the interrupted instruction. exceptions are classified as faults, traps, or aborts, depending on the way they are reported and wheth- er or not restart of the instruction causing the excep- tion is supported. faults are exceptions that are de- tected and serviced before the execution of the faulting instruction. traps are exceptions that are reported immediately after the execution of the in- struction which caused the problem. aborts are ex- ceptions which do not permit the precise location of the instruction causing the exception to be deter- mined. thus, when an interrupt service routine has been completed, execution proceeds from the instruction immediately following the interrupted instruction. on the other hand, the return address from an excep- tion fault routine will always point to the instruction causing the exception and will include any leading instruction prefixes. table 2.5 summarizes the possi- ble interrupts for the intel386 sx microprocessor and shows where the return address points to. table 2.5. interrupt vector assignments return address interrupt instruction which points to function number can cause faulting type exception instruction divide error 0 div, idiv yes fault debug exception 1 any instruction yes trap * nmi interrupt 2 int 2 or nmi no nmi one byte interrupt 3 int no trap interrupt on overflow 4 into no trap array bounds check 5 bound yes fault invalid op-code 6 any illegal instruction yes fault device not available 7 esc, wait yes fault double fault 8 any instruction that can abort generate an exception coprocessor segment overrun 9 esc no abort invalid tss 10 jmp, call, iret, int yes fault segment not present 11 segment register instructions yes fault stack fault 12 stack references yes fault general protection fault 13 any memory reference yes fault page fault 14 any memory access or code fetch yes fault coprocessor error 16 esc, wait yes fault intel reserved 17 32 two byte interrupt 33 255 int n no trap * some debug exceptions may report both traps on the previous instruction and faults on the next instruction. 17
intel386 tm sx microprocessor the intel386 sx microprocessor has the ability to handle up to 256 different interrupts/exceptions. in order to service the interrupts, a table with up to 256 interrupt vectors must be defined. the interrupt vec- tors are simply pointers to the appropriate interrupt service routine. in real mode, the vectors are 4-byte quantities, a code segment plus a 16-bit offset; in protected mode, the interrupt vectors are 8 byte quantities, which are put in an interrupt descriptor table. of the 256 possible interrupts, 32 are re- served for use by intel and the remaining 224 are free to be used by the system designer. interrupt processing when an interrupt occurs, the following actions hap- pen. first, the current program address and flags are saved on the stack to allow resumption of the interrupted program. next, an 8-bit vector is supplied to the intel386 sx microprocessor which identifies the appropriate entry in the interrupt table. the table contains the starting address of the interrupt service routine. then, the user supplied interrupt service routine is executed. finally, when an iret instruc- tion is executed the old processor state is restored and program execution resumes at the appropriate instruction. the 8-bit interrupt vector is supplied to the intel386 sx microprocessor in several different ways: excep- tions supply the interrupt vector internally; software int instructions contain or imply the vector; maska- ble hardware interrupts supply the 8-bit vector via the interrupt acknowledge bus sequence. non- maskable hardware interrupts are assigned to inter- rupt vector 2. maskable interrupt maskable interrupts are the most common way to respond to asynchronous external hardware events. a hardware interrupt occurs when the intr is pulled high and the interrupt flag bit (if) is enabled. the processor only responds to interrupts between in- structions (string instructions have an `interrupt win- dow` between memory moves which allows inter- rupts during long string moves). when an interrupt occurs the processor reads an 8-bit vector supplied by the hardware which identifies the source of the interrupt (one of 224 user defined interrupts). interrupts through interrupt gates automatically reset if, disabling intr requests. interrupts through trap gates leave the state of the if bit unchanged. inter- rupts through a task gate change the if bit accord- ing to the image of the eflags register in the task's task state segment (tss). when an iret instruc- tion is executed, the original state of the if bit is restored. non-maskable interrupt non-maskable interrupts provide a method of servic- ing very high priority interrupts. when the nmi input is pulled high it causes an interrupt with an internal- ly supplied vector value of 2. unlike a normal hard- ware interrupt, no interrupt acknowledgment se- quence is performed for an nmi. while executing the nmi servicing procedure, the in- tel386 sx microprocessor will not service any further nmi request or int requests until an interrupt return (iret) instruction is executed or the processor is reset. if nmi occurs while currently servicing an nmi, its presence will be saved for servicing after execut- ing the first iret instruction. the if bit is cleared at the beginning of an nmi interrupt to inhibit further intr interrupts. software interrupts a third type of interrupt/exception for the intel386 sx microprocessor is the software interrupt. an int n instruction causes the processor to execute the interrupt service routine pointed to by the n th vector in the interrupt table. a special case of the two byte software interrupt int n is the one byte int 3, or breakpoint interrupt. by inserting this one byte instruction in a program, the user can set breakpoints in his program as a debug- ging tool. a final type of software interrupt is the single step interrupt. it is discussed in single step trap . 18
intel386 tm sx microprocessor interrupt and exception priorities interrupts are externally generated events. maska- ble interrupts (on the intr input) and non-maskable interrupts (on the nmi input) are recognized at in- struction boundaries. when nmi and maskable intr are both recognized at the same instruction boundary, the intel386 sx microprocessor invokes the nmi service routine first. if maskable interrupts are still enabled after the nmi service routine has been invoked, then the intel386 sx microprocessor will invoke the appropriate interrupt service routine. as the intel386 sx microprocessor executes instruc- tions, it follows a consistent cycle in checking for exceptions, as shown in table 2.6. this cycle is re- peated as each instruction is executed, and occurs in parallel with instruction decoding and execution. instruction restart the intel386 sx microprocessor fully supports re- starting all instructions after faults. if an exception is detected in the instruction to be executed (exception categories 4 through 10 in table 2.6), the intel386 sx microprocessor invokes the appropriate excep- tion service routine. the intel386 sx microprocessor is in a state that permits restart of the instruction, for all cases but those given in table 2.7. note that all such cases will be avoided by a properly designed operating system. table 2.6. sequence of exception checking consider the case of the intel386 sx microprocessor having just completed an instruction. it then performs the following checks before reaching the point where the next instruction is completed: 1. check for exception 1 traps from the instruction just completed (single-step via trap flag, or data breakpoints set in the debug registers). 2. check for external nmi and intr. 3. check for exception 1 faults in the next instruction (instruction execution breakpoint set in the debug registers for the next instruction). 4. check for segmentation faults that prevented fetching the entire next instruction (exceptions 11 or 13). 5. check for page faults that prevented fetching the entire next instruction (exception 14). 6. check for faults decoding the next instruction (exception 6 if illegal opcode; exception 6 if in real mode or in virtual 8086 mode and attempting to execute an instruction for protected mode only; or exception 13 if instruction is longer than 15 bytes, or privilege violation in protected mode (i.e. not at iopl or at cpl e 0). 7. if wait opcode, check if ts e 1 and mp e 1 (exception 7 if both are 1). 8. if escape opcode for numeric coprocessor, check if em e 1orts e 1 (exception 7 if either are 1). 9. if wait opcode or escape opcode for numeric coprocessor, check error y input signal (exception 16 if error y input is asserted). 10. check in the following order for each memory reference required by the instruction: a. check for segmentation faults that prevent transferring the entire memory quantity (exceptions 11, 12, 13). b. check for page faults that prevent transferring the entire memory quantity (exception 14). note: segmentation exceptions are generated before paging exceptions. table 2.7. conditions preventing instruction restart 1. an instruction causes a task switch to a task whose task state segment is partially `not present` (an entirely `not present` tss is restartable). partially present tss's can be avoided either by keeping the tss's of such tasks present in memory, or by aligning tss segments to reside entirely within a single 4k page (for tss segments of 4k bytes or less). 2. a coprocessor operand wraps around the top of a 64k-byte segment or a 4g-byte segment, and spans three pages, and the page holding the middle portion of the operand is `not present`. this condition can be avoided by starting at a page boundary any segments containing coprocessor operands if the segments are approximately 64k-200 bytes or larger (i.e. large enough for wraparound of the coproces- sor operand to possibly occur). note that these conditions are avoided by using the operating system designs mentioned in this table. 19
intel386 tm sx microprocessor table 2.8. register values after reset flag word (eflags) uuuu0002h note 1 machine status word (cr0) uuuuuu10h instruction pointer (eip) 0000fff0h code segment (cs) f000h note 2 data segment (ds) 0000h note 3 stack segment (ss) 0000h extra segment (es) 0000h note 3 extra segment (fs) 0000h extra segment (gs) 0000h eax register 0000h note 4 edx register component and stepping id note 5 all other registers undefined note 6 notes: 1. eflag register. the upper 14 bits of the eflags register are undefined, all defined flag bits are zero. 2. the code segment register (cs) will have its base address set to 0ffff0000h and limit set to 0ffffh. 3. the data and extra segment registers (ds, es) will have their base address set to 000000000h and limit set to 0ffffh. 4. if self-test is selected, the eax register should contai n a 0 value. if a value of 0 is not found then the self-test has detected a flaw in the part. 5. edx register always holds component and stepping identifier. 6. all undefined bits are intel reserved and should not be used. double fault a double fault (exception 8) results when the proc- essor attempts to invoke an exception service rou- tine for the segment exceptions (10, 11, 12 or 13), but in the process of doing so detects an exception other than a page fault (exception 14). one other cause of generating a double fault is the intel386 sx microprocessor detecting any other ex- ception when it is attempting to invoke the page fault (exception 14) service routine (for example, if a page fault is detected when the intel386 sx micro- processor attempts to invoke the page fault service routine). of course, in any functional system, not only in intel386 sx microprocessor-based systems, the entire page fault service routine must remain `present` in memory. 2.8 reset and initialization when the processor is initialized or reset the regis- ters have the values shown in table 2.8. the in- tel386 sx microprocessor will then start executing instructions near the top of physical memory, at lo- cation 0fffff0h. when the first intersegment jump or call is executed, address lines a 20 a 23 will drop low for cs-relative memory cycles, and the intel386 sx microprocessor will only execute in- structions in the lower one megabyte of physical memory. this allows the system designer to use a shadow rom at the top of physical memory to ini- tialize the system and take care of resets. reset forces the intel386 sx microprocessor to terminate all execution and local bus activity. no in- struction execution or bus activity will occur as long as reset is active. between 350 and 450 clk2 peri- ods after reset becomes inactive, the intel386 sx microprocessor will start executing instructions at the top of physical memory. 2.9 testability the intel386 sx microprocessor, like the intel386 microprocessor, offers testability features which in- clude a self-test and direct access to the page trans- lation cache. self-test the intel386 sx microprocessor has the capability to perform a self-test. the self-test checks the func- tion of all of the control rom and most of the non- random logic of the part. approximately one-half of the intel386 sx microprocessor can be tested during self-test. self-test is initiated on the intel386 sx microproces- sor when the reset pin transitions from high to low, and the busy y pin is low. the self-test takes about 2 20 clocks, or approximately 33 millisec- onds with a 16 mhz intel386 sx cpu. at the com- pletion of self-test the processor performs reset and begins normal operation. the part has successfully passed self-test if the contents of the eax are zero. if the results of the eax are not zero then the self- test has detected a flaw in the part. 20
intel386 tm sx microprocessor tlb testing the intel386 sx microprocessor also provides a mechanism for testing the translation lookaside buffer (tlb) if desired. this particular mechanism may not be continued in the same way in future processors. there are two tlb testing operations: 1) writing en- tries into the tlb, and, 2) performing tlb lookups. two test registers, shown in figure 2.6, are provid- ed for the purpose of testing. tr6 is the ``test com- mand register'', and tr7 is the ``test data register''. for a more detailed explanation of testing the tlb, see the intel386 tm sx microprocessor program- mer's reference manual. 2.10 debugging support the intel386 sx microprocessor provides several features which simplify the debugging process. the three categories of on-chip debugging aids are: 1. the code execution breakpoint opcode (0cch). 2. the single-step capability provided by the tf bit in the flag register. 3. the code and data breakpoint capability provided by the debug registers dr0 3, dr6, and dr7. breakpoint instruction a single-byte software interrupt (int 3) breakpoint in- struction is available for use by software debuggers. the breakpoint opcode is 0cch, and generates an exception 3 trap when executed. single-step trap if the single-step flag (tf, bit 8) in the eflag regis- ter is found to be set at the end of an instruction, a single-step exception occurs. the single-step ex- ception is auto vectored to exception number 1. debug registers the debug registers are an advanced debugging feature of the intel386 sx microprocessor. they al- low data access breakpoints as well as code execu- tion breakpoints. since the breakpoints are indicated by on-chip registers, an instruction execution break- point can be placed in rom code or in code shared by several tasks, neither of which can be supported by the int 3 breakpoint opcode. the intel386 sx microprocessor contains six debug registers, consisting of four breakpoint address reg- isters and two breakpoint control registers. initially after reset, breakpoints are in the disabled state; therefore, no breakpoints will occur unless the de- bug registers are programmed. breakpoints set up in the debug registers are auto-vectored to exception 1. figure 2.7 shows the breakpoint status and con- trol registers. 240187 7 figure 2.6. test registers 21
intel386 tm sx microprocessor 240187 8 figure 2.7. debug registers 3.0 real mode architecture when the processor is reset or powered up it is ini- tialized in real mode. real mode has the same base architecture as the 8086, but allows access to the 32-bit register set of the intel386 sx microproces- sor. the addressing mechanism, memory size, and interrupt handling are all identical to the real mode on the 80286. the default operand size in real mode is 16 bits, as in the 8086. in order to use the 32-bit registers and addressing modes, override prefixes must be used. in addition, the segment size on the intel386 sx mi- croprocessor in real mode is 64k bytes so 32-bit addresses must have a value less then 0000ffffh. the primary purpose of real mode is to set up the processor for protected mode operation. 3.1 memory addressing in real mode the linear addresses are the same as physical addresses (paging is not allowed). physical addresses are formed in real mode by adding the contents of the appropriate segment register which is shifted left by four bits to an effective address. this addition results in a 20-bit physical address or a 1 megabyte address space. since segment registers are shifted left by 4 bits, real mode segments al- ways start on 16-byte boundaries. all segments in real mode are exactly 64k bytes long, and may be read, written, or executed. the intel386 sx microprocessor will generate an excep- tion 13 if a data operand or instruction fetch occurs past the end of a segment. 22
intel386 tm sx microprocessor table 3.1. exceptions in real mode function interrupt related return number instructions address location interrupt table limit 8 int vector is not before too small within table limit instruction cs, ds, es, fs, gs 13 word memory reference before segment overrun exception with offset e 0ffffh. instruction an attempt to execute past the end of cs segment. ss segment overrun 12 stack reference before exception beyond offset e 0ffffh instruction 3.2 reserved locations there are two fixed areas in memory which are re- served in real address mode: the system initializa- tion area and the interrupt table area. locations 00000h through 003ffh are reserved for interrupt vectors. each one of the 256 possible interrupts has a 4-byte jump vector reserved for it. locations 0fffff0h through 0ffffffh are reserved for sys- tem initialization. 3.3 interrupts many of the exceptions discussed in section 2.7 are not applicable to real mode operation; in particular, exceptions 10, 11 and 14 do not occur in real mode. other exceptions have slightly different meanings in real mode; table 3.1 identifies these exceptions. 3.4 shutdown and halt the hlt instruction stops program execution and prevents the processor from using the local bus until restarted. either nmi, flt y , intr with interrupts enabled (if e 1), or reset will force the intel386 sx microprocessor out of halt. if interrupted, the saved cs:ip will point to the next instruction after the hlt. shutdown will occur when a severe error is detected that prevents further processing. in real mode, shutdown can occur under two conditions: 1. an interrupt or an exception occurs (exceptions 8 or 13) and the interrupt vector is larger than the interrupt descriptor table. 2. a call, int or push instruction attempts to wrap around the stack segment when sp is not even. an nmi input can bring the processor out of shut- down if the interrupt descriptor table limit is large enough to contain the nmi interrupt vector (at least 000fh) and the stack has enough room to contain the vector and flag information (i.e. sp is greater that 0005h). otherwise, shutdown can only be exited by a processor reset. 3.5 lock operation the lock prefix on the intel386 sx microprocessor, even in real mode, is more restrictive than on the 80286. this is due to the addition of paging on the intel386 sx microprocessor in protected mode and virtual 8086 mode. the lock prefix is not support- ed during repeat string instructions. the only instruction forms where the lock prefix is legal on the intel386 sx microprocessor are shown in table 3.2. table 3.2. legal instructions for the lock prefix opcode operands (dest, source) bit test and set/reset mem, reg/immediate /complement xchg reg, mem xchg mem, reg add, or, adc, sbb, and, sub, xor mem, reg/immediate not, neg, inc, dec mem an exception 6 will be generated if a lock prefix is placed before any instruction form or opcode not listed above. the lock prefix allows indivisible read/modify/write operations on memory operands using the instructions above. the lock prefix is not iopl-sensitive on the intel386 sx microprocessor. the lock prefix can be used at any privilege level, but only on the in- struction forms listed in table 3.2. 23
intel386 tm sx microprocessor 4.0 protected mode architecture the complete capabilities of the intel386 sx micro- processor are unlocked when the processor oper- ates in protected virtual address mode (protected mode). protected mode vastly increases the linear address space to four gigabytes (2 32 bytes) and al- lows the running of virtual memory programs of al- most unlimited size (64 terabytes (2 46 bytes)). in ad- dition, protected mode allows the intel386 sx micro- processor to run all of the existing intel386 dx cpu (using only 16 megabytes of physical memory), 80286 and 8086 cpu's software, while providing a sophisticated memory management and a hard- ware-assisted protection mechanism. protected mode allows the use of additional instructions spe- cially optimized for supporting multitasking operating systems. the base architecture of the intel386 sx microprocessor remains the same; the registers, in- structions, and addressing modes described in the previous sections are retained. the main difference between protected mode and real mode from a programmer's viewpoint is the increased address space and a different addressing mechanism. 4.1 addressing mechanism like real mode, protected mode uses two compo- nents to form the logical address; a 16-bit selector is used to determine the linear base address of a seg- ment, the base address is added to a 32-bit effective address to form a 32-bit linear address. the linear address is then either used as a 24-bit physical ad- dress, or if paging is enabled the paging mechanism maps the 32-bit linear address into a 24-bit physical address. the difference between the two modes lies in calcu- lating the base address. in protected mode, the se- lector is used to specify an index into an operating system defined table (see figure 4.1). the table contains the 32-bit base address of a given seg- ment. the physical address is formed by adding the base address obtained from the table to the offset. paging provides an additional memory management mechanism which operates only in protected mode. paging provides a means of managing the very large segments of the intel386 sx microprocessor, as paging operates beneath segmentation. the page mechanism translates the protected linear address which comes from the segmentation unit into a physical address. figure 4.2 shows the complete in- tel386 sx microprocessor addressing mechanism with paging enabled. 4.2 segmentation segmentation is one method of memory manage- ment. segmentation provides the basis for protec- tion. segments are used to encapsulate regions of memory which have common attributes. for exam- ple, all of the code of a given program could be con- tained in a segment, or an operating system table may reside in a segment. all information about each segment is stored in an 8 byte data structure called a descriptor. all of the descriptors in a system are contained in descriptor tables which are recognized by hardware. terminology the following terms are used throughout the discus- sion of descriptors, privilege levels and protection: pl: privilege leveleone of the four hierarchical privilege levels. level 0 is the most privileged level and level 3 is the least privileged. rpl: requestor privilege levelethe privilege level of the original supplier of the selector. rpl is determined by the least two significant bits of a selector. dpl: descriptor privilege levelethis is the least privileged level at which a task may access that descriptor (and the segment associated with that descriptor). descriptor privilege lev- el is determined by bits 6:5 in the access right byte of a descriptor. cpl: current privilege levelethe privilege level at which a task is currently executing, which equals the privilege level of the code segment being executed. cpl can also be determined by examining the lowest 2 bits of the cs regis- ter, except for conforming code segments. epl: effective privilege levelethe effective privi- lege level is the least privileged of the rpl and the dpl. epl is the numerical maximum of rpl and dpl. task: one instance of the execution of a program. tasks are also referred to as processes. descriptor tables the descriptor tables define all of the segments which are used in a intel386 sx microprocessor sys- tem. there are three types of tables which hold de- scriptors: the global descriptor table, local de- scriptor table, and the interrupt descriptor table. all of the tables are variable length memory arrays and can vary in size from 8 bytes to 64k bytes. each table can hold up to 8192 8-byte descriptors. the upper 13 bits of a selector are used as an index into the descriptor table. the tables have registers asso- ciated with them which hold the 32-bit linear base address and the 16-bit limit of each table. 24
intel386 tm sx microprocessor 240187 9 figure 4.1. protected mode addressing 240187 10 figure 4.2. paging and segmentation 240187 11 figure 4.3. descriptor table registers 25
intel386 tm sx microprocessor each of the tables has a register associated with it: gdtr, ldtr, and idtr; see figure 2.1. the lgdt, lldt, and lidt instructions load the base and limit of the global, local, and interrupt descriptor tables into the appropriate register. the sgdt, sldt, and sidt store the base and limit values. these are priv- ileged instructions. global descriptor table the global descriptor table (gdt) contains de- scriptors which are available to all of the tasks in a system. the gdt can contain any type of segment descriptor except for interrupt and trap descriptors. every intel386 sx cpu system contains a gdt. the first slot of the global descriptor table corre- sponds to the null selector and is not used. the null selector defines a null pointer value. local descriptor table ldts contain descriptors which are associated with a given task. generally, operating systems are de- signed so that each task has a separate ldt. the ldt may contain only code, data, stack, task gate, and call gate descriptors. ldts provide a mecha- nism for isolating a given task's code and data seg- ments from the rest of the operating system, while the gdt contains descriptors for segments which are common to all tasks. a segment cannot be ac- cessed by a task if its segment descriptor does not exist in either the current ldt or the gdt. this pro- vides both isolation and protection for a task's seg- ments while still allowing global data to be shared among tasks. unlike the 6-byte gdt or idt registers which contain a base address and limit, the visible portion of the ldt register contains only a 16-bit selector. this se- lector refers to a local descriptor table descriptor in the gdt (see figure 2.1). interrupt descriptor table the third table needed for intel386 sx microproces- sor systems is the interrupt descriptor table. the idt contains the descriptors which point to the loca- tion of the up to 256 interrupt service routines. the idt may contain only task gates, interrupt gates, and trap gates. the idt should be at least 256 bytes in size in order to hold the descriptors for the 32 intel reserved interrupts. every interrupt used by a sys- tem must have an entry in the idt. the idt entries are referenced by int instructions, external interrupt vectors, and exceptions. descriptors the object to which the segment selector points to is called a descriptor. descriptors are eight byte quantities which contain attributes about a given re- gion of linear address space. these attributes in- clude the 32-bit base linear address of the segment, the 20-bit length and granularity of the segment, the protection level, read, write or execute privileges, the default size of the operands (16-bit or 32-bit), and the type of segment. all of the attribute informa- tion about a segment is contained in 12 bits in the segment descriptor. figure 4.4 shows the general format of a descriptor. all segments on the intel386 sx microprocessor have three attribute fields in common: the p bit, the dpl bit, and the s bit. the p 31 0 byte segment base 1 5...0 segment limit 1 5...0 address 0 base 3 1...24 g d 0 avl limit p dpl s type a base a 4 19...16 23...16 base base address of the segment limit the length of the segment p present bit 1 e present 0 e not present dpl descriptor privilege level 0 3 s segment descriptor 0 e system descriptor 1 e code or data segment descriptor type type of segment a accessed bit g granularity bit 1 e segment length is page granular 0 e segment length is byte granular d default operation size (recognized in code segment descriptors only) 1 e 32-bit segment 0 e 16-bit segment 0 bit must be zero (0) for compatibility with future processors avl available field for user or os figure 4.4. segment descriptors 26
intel386 tm sx microprocessor (present) bit is 1 if the segment is loaded in physical memory. if p e 0 then any attempt to access this segment causes a not present exception (exception 11). the descriptor privilege level, dpl, is a two bit field which specifies the protection level, 0 3, asso- ciated with a segment. the intel386 sx microprocessor has two main cate- gories of segments: system segments and non-sys- tem segments (for code and data). the segment bit, s, determines if a given segment is a system seg- ment or a code or data segment. if the s bit is 1 then the segment is either a code or data segment; if it is 0 then the segment is a system segment. code and data descriptors (s e 1) figure 4.5 shows the general format of a code and data descriptor and table 4.1 illustrates how the bits in the access right byte are interpreted. 31 0 segment base 1 5...0 segment limit 1 5...0 0 limit access base base 3 1...24 g d 0 avl 19...16 rights 23...16 a 4 byte d/b 1 e default instructions attributes are 32-bits 0 e default instruction attributes are 16-bits avl available field for user or os g granularity bit 1 e segment length is page granular 0 e segment length is byte granular 0 bit must be zero (0) for compatibility with future processors figure 4.5. code and data descriptors table 4.1. access rights byte definition for code and data descriptors bit name function position 7 present (p) p e 1 segment is mapped into physical memory. p e 0 no mapping to physical memory exists, base and limt are not used. 6 5 descriptor privilege segment privilege attribute used in privilege tests. level (dpl) 4 segment descrip- s e 1 code or data (includes stacks) segment descriptor tor (s) s e 0 system segment descriptor or gate descriptor 3 executable (e) e e 0 descriptor type is data segment: if 2 expansion direc- ed e 0 expand up segment, offsets must be s limit. data tion (ed) ed e 1 expand down segment, offsets must be l limit. segment 1 writeable (w) w e 0 data segment may not be written into. (s e 1, w e 1 data segment may be written into. * e e 0) 3 executable (e) e e 1 descriptor type is code segment: if 2 conforming (c) c e 1 code segment may only be executed code when cpl t dpl and cpl segment remains unchanged. (s e 1, 1 readable (r) r e 0 code segment may not be read. e e 1) r e 1 code segment may be read. * 0 accessed (a) a e 0 segment has not been accessed. a e 1 segment selector has been loaded into segment register or used by selector test instructions. 27
intel386 tm sx microprocessor 31 16 0 segment base 1 5...0 segment limit 1 5...0 0 base 3 1...24 g 0 0 0 limit p dpl 0 type base a 4 19...16 23...16 type defines 0 invalid 1 available 80286 tss 2 ldt 3 busy 80286 tss 4 80286 call gate 5 task gate (for 80286 or intel386 tm sx microprocessor task) 6 80286 interrupt gate 7 80286 trap gate type defines 8 invalid 9 available intel386 tm sx microprocessor tss a undefined (intel reserved) b busy intel386 tm sx microprocessor tss c intel386 tm sx microprocessor call gate d undefined (intel reserved) e intel386 tm sx microprocessor interrupt gate f intel386 tm sx microprocessor trap gate figure 4.6. system descriptors code and data segments have several descriptor fields in common. the accessed bit, a, is set when- ever the processor accesses a descriptor. the gran- ularity bit, g, specifies if a segment length is byte- granular or page-granular. system descriptor formats (s e 0) system segments describe information about oper- ating system tables, tasks, and gates. figure 4.6 shows the general format of system segment de- scriptors, and the various types of system segments. intel386 sx system descriptors (which are the same as intel386 dx cpu system descriptors) contain a 32-bit base linear address and a 20-bit segment lim- it. 80286 system descriptors have a 24-bit base ad- dress and a 16-bit segment limit. 80286 system de- scriptors are identified by the upper 16 bits being all zero. differences between intel386 tm sx microprocessor and 80286 descriptors in order to provide operating system compatibility with the 80286 the intel386 sx cpu supports all of the 80286 segment descriptors. the 80286 system segment descriptors contain a 24-bit base address and 16-bit limit, while the intel386 sx cpu system segment descriptors have a 32-bit base address, a 20-bit limit field, and a granularity bit. the word count field specifies the number of 16-bit quantities to copy for 80286 call gates and 32-bit quantities for intel386 sx cpu call gates. selector fields a selector in protected mode has three fields: local or global descriptor table indicator (ti), descriptor entry index (index), and requestor (the selector's) privilege level (rpl) as shown in figure 4.7. the ti bit selects either the global descriptor table or the local descriptor table. the index selects one of 8k descriptors in the appropriate descriptor table. the rpl bits allow high speed testing of the selector's privilege attributes. segment descriptor cache in addition to the selector value, every segment reg- ister has a segment descriptor cache register asso- ciated with it. whenever a segment register's con- tents are changed, the 8-byte descriptor associated with that selector is automatically loaded (cached) on the chip. once loaded, all references to that seg- ment use the cached descriptor information instead of reaccessing the descriptor. the contents of the descriptor cache are not visible to the programmer. since descriptor caches only change when a seg- ment register is changed, programs which modify the descriptor tables must reload the appropriate segment registers after changing a descriptor's val- ue. 28
intel386 tm sx microprocessor 240187 12 figure 4.7. example descriptor selection 4.3 protection the intel386 sx microprocessor has four levels of protection which are optimized to support a multi- tasking operating system and to isolate and protect user programs from each other and the operating system. the privilege levels control the use of privi- leged instructions, i/o instructions, and access to segments and segment descriptors. the intel386 sx microprocessor also offers an additional type of pro- tection on a page basis when paging is enabled. the four-level hierarchical privilege system is an ex- tension of the user/supervisor privilege mode com- monly used by minicomputers. the user/supervisor mode is fully supported by the intel386 sx micro- processor paging mechanism. the privilege levels (pl) are numbered 0 through 3. level 0 is the most privileged level. rules of privilege the intel386 sx microprocessor controls access to both data and procedures between levels of a task, according to the following rules. e data stored in a segment with privilege level p can be accessed only by code executing at a privilege level at least as privileged as p . e a code segment/procedure with privilege level p can only be called by a task executing at the same or a lesser privilege level than p . privilege levels at any point in time, a task on the intel386 sx micro- processor always executes at one of the four privi- lege levels. the current privilege level (cpl) speci- fies what the task's privilege level is. a task's cpl may only be changed by control transfers through gate descriptors to a code segment with a different privilege level. thus, an application program running at pl e 3 may call an operating system routine at pl e 1 (via a gate) which would cause the task's cpl to be set to 1 until the operating system routine was finished. selector privilege (rpl) the privilege level of a selector is specified by the rpl field. the selector's rpl is only used to estab- lish a less trusted privilege level than the current privilege level of the task for the use of a segment. this level is called the task's effective privilege level (epl). the epl is defined as being the least privi- leged (numerically larger) level of a task's cpl and a selector's rpl. the rpl is most commonly used to verify that pointers passed to an operating system procedure do not access data that is of higher privi- lege than the procedure that originated the pointer. since the originator of a selector can specify any rpl value, the adjust rpl (arpl) instruction is pro- vided to force the rpl bits to the originator's cpl. 29
intel386 tm sx microprocessor table 4.2. descriptor types used for control transfer control transfer types operation types descriptor descriptor referenced table intersegment within the same privilege level jmp, call ret, iret * code segment gdt/ldt intersegment to the same or higher privilege level call call gate gdt/ldt interrupt within task may change cpl interrupt instruction trap or idt exception external interrupt interrupt gate intersegment to a lower privilege level ret, iret * code segment gdt/ldt (changes task cpl) call, jmp task state gdt segment task switch call, jmp task gate gdt/ldt iret ** task gate idt interrupt instruction, exception, external interrupt * nt (nested task bit of flag register) e 0 ** nt (nested task bit of flag register) e 1 i/o privilege the i/o privilege level (iopl) lets the operating sys- tem code executing at cpl e 0 define the least privi- leged level at which i/o instructions can be used. an exception 13 (general protection violation) is gener- ated if an i/o instruction is attempted when the cpl of the task is less privileged then the iopl. the iopl is stored in bits 13 and 14 of the eflags reg- ister. the following instructions cause an exception 13 if the cpl is greater than iopl: in, ins, out, outs, sti, cli, lock prefix. descriptor access there are basically two types of segment accesses: those involving code segments such as control transfers, and those involving data accesses. deter- mining the ability of a task to access a segment in- volves the type of segment to be accessed, the in- struction used, the type of descriptor used and cpl, rpl, and dpl as described above. any time an instruction loads a data segment regis- ter (ds, es, fs, gs) the intel386 sx microprocessor makes protection validation checks. selectors load- ed in the ds, es, fs, gs registers must refer only to data segment or readable code segments. finally the privilege validation checks are performed. the cpl is compared to the epl and if the epl is more privileged than the cpl, an exception 13 (gen- eral protection fault) is generated. the rules regarding the stack segment are slightly different than those involving data segments. in- structions that load selectors into ss must refer to data segment descriptors for writeable data seg- ments. the dpl and rpl must equal the cpl of all other descriptor types or a privilege level violation will cause an exception 13. a stack not present fault causes an exception 12. privilege level transfers inter-segment control transfers occur when a selec- tor is loaded in the cs register. for a typical system most of these transfers are simply the result of a call or a jump to another routine. there are five types of control transfers which are summarized in table 4.2. many of these transfers result in a privilege level transfer. changing privilege levels is done only by control transfers, using gates, task switches, and in- terrupt or trap gates. control transfers can only occur if the operation which loaded the selector references the correct de- scriptor type. any violation of these descriptor usage rules will cause an exception 13. 30
intel386 tm sx microprocessor 240187 13 type e 9: available intel386 tm sx microprocessor tss. type e b: busy intel386 sx microprocessor tss. figure 4.8. intel386 tm sx microprocessor tss and tss registers 31
intel386 tm sx microprocessor 240187 14 i/o ports accessible: 2 x 9, 12, 13, 15, 20 x 24, 27, 33, 34, 40, 41, 48, 50, 52, 53, 58 x 60, 62, 63, 96 x 127 figure 4.9. sample i/o permission bit map call gates gates provide protected indirect calls. one of the major uses of gates is to provide a secure method of privilege transfers within a task. since the operating system defines all of the gates in a system, it can ensure that all gates only allow entry into a few trust- ed procedures. task switching a very important attribute of any multi-tasking/multi- user operating system is its ability to rapidly switch between tasks or processes. the intel386 sx micro- processor directly supports this operation by provid- ing a task switch instruction in hardware. the task switch operation saves the entire state of the ma- chine (all of the registers, address space, and a link to the previous task), loads a new execution state, performs protection checks, and commences execu- tion in the new task. like transfer of control by gates, the task switch operation is invoked by exe- cuting an inter-segment jmp or call instruction which refers to a task state segment (tss), or a task gate descriptor in the gdt or ldt. an int n instruction, exception, trap, or external interrupt may also invoke the task switch operation if there is a task gate descriptor in the associated idt descriptor slot. the tss descriptor points to a segment (see figure 4.8) containing the entire execution state. a task gate descriptor contains a tss selector. the intel386 sx microprocessor supports both the 80286 and intel386 sx cpu tsss. the limit of a intel386 sx microprocessor tss must be greater than 64h (2bh for an 80286 tss), and can be as large as 16 megabytes. in the additional tss space, the operating system is free to store additional infor- mation such as the reason the task is inactive, time the task has spent running, or open files belonging to the task. each task must have a tss associated with it. the current tss is identified by a special register in the intel386 sx microprocessor called the task state segment register (tr). this register contains a se- lector referring to the task state segment descriptor that defines the current tss. a hidden base and limit register associated with tss descriptor are loaded whenever tr is loaded with a new selector. return- ing from a task is accomplished by the iret instruc- tion. when iret is executed, control is returned to the task which was interrupted. the currently exe- cuting task's state is saved in the tss and the old task state is restored from its tss. several bits in the flag register and machine status word (cr0) give information about the state of a task which is useful to the operating system. the nested task bit, nt, controls the function of the iret instruction. if nt e 0 the iret instruction per- forms the regular return. if nt e 1 iret performs a task switch operation back to the previous task. the nt bit is set or reset in the following fashion: when a call or int instruction initiates a task switch, the new tss will be marked busy and the back link field of the new tss set to the old tss selector. the nt bit of the new task is set by call or int initiated task switches. an in- terrupt that does not cause a task switch will clear nt (the nt bit will be restored after exe- cution of the interrupt handler). nt may also be set or cleared by popf or iret instructions. the intel386 sx microprocessor task state segment is marked busy by changing the descriptor type field from type 9 to type 0bh. an 80286 tss is marked busy by changing the descriptor type field from type 1 to type 3. use of a selector that refer- ences a busy task state segment causes an excep- tion 13. the vm (virtual mode) bit is used to indicate if a task is a virtual 8086 task. if vm e 1 then the tasks will use the real mode addressing mechanism. the vir- tual 8086 environment is only entered and exited by a task switch. the coprocessor's state is not automatically saved when a task switch occurs. the task switched bit, ts, in the cr0 register helps deal with the coproces- sor's state in a multi-tasking environment. whenever the intel386 sx microprocessor switches task, it sets the ts bit. the intel386 sx microprocessor de- tects the first use of a processor extension instruc- tion after a task switch and causes the processor extension not available exception 7. the exception handler for exception 7 may then decide whether to save the state of the coprocessor. the t bit in the intel386 sx microprocessor tss indicates that the processor should generate a de- bug exception when switching to a task. if t e 1 then upon entry to a new task a debug exception 1 will be generated. 32
intel386 tm sx microprocessor initialization and transition to protected mode since the intel386 sx microprocessor begins exe- cuting in real mode immediately after reset it is necessary to initialize the system tables and regis- ters with the appropriate values. the gdt and idt registers must refer to a valid gdt and idt. the idt should be at least 256 bytes long, and the gdt must contain descriptors for the initial code and data seg- ments. protected mode is enabled by loading cr0 with pe bit set. this can be accomplished by using the mov cr0, r/m instruction. after enabling protected mode, the next instruction should execute an inter- segment jmp to load the cs register and flush the instruction decode queue. the final step is to load all of the data segment registers with the initial selector values. an alternate approach to entering protected mode is to use the built in task-switch to load all of the regis- ters. in this case the gdt would contain two tss descriptors in addition to the code and data descrip- tors needed for the first task. the first jmp instruc- tion in protected mode would jump to the tss caus- ing a task switch and loading all of the registers with the values stored in the tss. the task state seg- ment register should be initialized to point to a valid tss descriptor. 4.4 paging paging is another type of memory management use- ful for virtual memory multi-tasking operating sys- tems. unlike segmentation, which modularizes pro- grams and data into variable length segments, pag- ing divides programs into multiple uniform size pages. pages bear no direct relation to the logical structure of a program. while segment selectors can be considered the logical `name` of a program mod- ule or data structure, a page most likely corresponds to only a portion of a module or data structure. page organization the intel386 sx microprocessor uses two levels of tables to translate the linear address (from the seg- mentation unit) into a physical address. there are three components to the paging mechanism of the intel386 sx microprocessor: the page directory, the page tables, and the page itself (page frame). all memory-resident elements of the intel386 sx micro- processor paging mechanism are the same size, namely 4k bytes. a uniform size for all of the ele- ments simplifies memory allocation and reallocation schemes, since there is no problem with memory fragmentation. figure 4.10 shows how the paging mechanism works. 240187 15 figure 4.10. paging mechanism 31 1211 10 9876543210 system u r page table address 31..12 software 0 0 d a 0 0 e e p defineable s w figure 4.11. page directory entry (points to page table) 33
intel386 tm sx microprocessor 31 1211 10 9876543210 system u r page frame address 31..12 software 0 0 d a 0 0 e e p defineable s w figure 4.12. page table entry (points to page) page fault register cr2 is the page fault linear address register. it holds the 32-bit linear address which caused the last page fault detected. page descriptor base register cr3 is the page directory physical base address register. it contains the physical starting address of the page directory (this value is truncated to a 24-bit value associated with the intel386 sx cpu's 16 megabyte physical memory limitation). the lower 12 bits of cr3 are always zero to ensure that the page directory is always page aligned. loading it with a mov cr3, reg instruction causes the page table en- try cache to be flushed, as will a task switch through a tss which changes the value of cr0. page directory the page directory is 4k bytes long and allows up to 1024 page directory entries. each page directory en- try contains information about the page table and the address of the next level of tables, the page tables. the contents of a page directory entry are shown in figure 4.11. the upper 10 bits of the linear address (a 31 a 22 ) are used as an index to select the correct page directory entry. the page table address contains the upper 20 bits of a 32-bit physical address that is used as the base address for the next set of tables, the page tables. the lower 12 bits of the page table address are zero so that the page table addresses appear on 4 kbyte boundaries. for a intel386 dx cpu system the up- per 20 bits will select one of 2 20 page tables, but for a intel386 sx microprocessor system the upper 20 bits only select one of 2 12 page tables. again, this is because the intel386 sx microprocessor is limited to a 24-bit physical address and the upper 8 bits (a 24 a 31 ) are truncated when the address is output on its 24 address pins. page tables each page table is 4k bytes long and allows up to 1024 page table entries. each page table entry con- tains information about the page frame and its ad- dress. the contents of a page table entry are shown in figure 4.12. the middle 10 bits of the linear address (a 21 a 12 ) are used as an index to select the correct page table entry. the page frame address contains the upper 20 bits of a 32-bit physical address that is used as the base address for the page frame. the lower 12 bits of the page frame address are zero so that the page frame addresses appear on 4 kbyte boundaries. for an intel386 dx cpu system the upper 20 bits will select one of 2 20 page frames, but for an intel386 sx microprocessor system the upper 20 bits only select one of 2 12 page frames. again, this is because the intel386 sx microprocessor is limited to a 24-bit physical address space and the upper 8 bits (a 24 a 31 ) are truncated when the address is output on its 24 address pins. page directory/table entries the lower 12 bits of the page table entries and page directory entries contain statistical information about pages and page tables respectively. the p (present) bit indicates if a page directory or page table entry can be used in address translation. if p e 1, the entry can be used for address translation. if p e 0, the entry cannot be used for translation. all of the other bits are available for use by the soft- ware. for example, the remaining 31 bits could be used to indicate where on disk the page is stored. the a (accessed) bit is set by the intel386 sx cpu for both types of entries before a read or write ac- cess occurs to an address covered by the entry. the d (dirty) bit is set to 1 before a write to an address covered by that page table entry occurs. the d bit is undefined for page directory entries. when the p, a and d bits are updated by the intel386 sx cpu, the processor generates a read- modify-write cycle which locks the bus and prevents conflicts with oth- er processors or peripherals. software which modi- fies these bits should use the lock prefix to ensure the integrity of the page tables in multi-master sys- tems. the 3 bits marked system software definable in fig- ures 4.11 and figure 4.12 are software definable. system software writers are free to use these bits for whatever purpose they wish. 34
intel386 tm sx microprocessor page level protection (r/w, u/s bits) the intel386 sx microprocessor provides a set of protection attributes for paging systems. the paging mechanism distinguishes between two levels of pro- tection: user, which corresponds to level 3 of the segmentation based protection, and supervisor which encompasses all of the other protection levels (0, 1, 2). programs executing at level 0, 1 or 2 by- pass the page protection, although segmentation- based protection is still enforced by the hardware. the u/s and r/w bits are used to provide user/su- pervisor and read/write protection for individual pages or for all pages covered by a page table di- rectory entry. the u/s and r/w bits in the second level page table entry apply only to the page de- scribed by that entry. while the u/s and r/w bits in the first level page directory table apply to all pages described by the page table pointed to by that direc- tory entry. the u/s and r/w bits for a given page are obtained by taking the most restrictive of the u/s and r/w from the page directory table entries and using these bits to address the page. translation lookaside buffer the intel386 sx microprocessor paging hardware is designed to support demand paged virtual memory systems. however, performance would degrade substantially if the processor was required to access two levels of tables for every memory reference. to solve this problem, the intel386 sx microprocessor keeps a cache of the most recently accessed pages, this cache is called the translation lookaside buffer (tlb). the tlb is a four-way set associative 32-en- try page table cache. it automatically keeps the most commonly used page table entries in the processor. the 32-entry tlb coupled with a 4k page size re- sults in coverage of 128k bytes of memory address- es. for many common multi-tasking systems, the tlb will have a hit rate of greater than 98%. this means that the processor will only have to access the two-level page structure for less than 2% of all memory references. paging operation the paging hardware operates in the following fash- ion. the paging unit hardware receives a 32-bit lin- ear address from the segmentation unit. the upper 20 linear address bits are compared with all 32 en- tries in the tlb to determine if there is a match. if there is a match (i.e. a tlb hit), then the 24-bit phys- ical address is calculated and is placed on the ad- dress bus. if the page table entry is not in the tlb, the intel386 sx microprocessor will read the appropriate page directory entry. if p e 1 on the page directory entry, indicating that the page table is in memory, then the intel386 sx microprocessor will read the appropriate page table entry and set the access bit. if p e 1on the page table entry, indicating that the page is in memory, the intel386 sx microprocessor will update the access and dirty bits as needed and fetch the operand. the upper 20 bits of the linear address, read from the page table, will be stored in the tlb for future accesses. if p e 0 for either the page di- rectory entry or the page table entry, then the proc- essor will generate a page fault exception 14. the processor will also generate a page fault (ex- ception 14) if the memory reference violated the page protection attributes. cr2 will hold the linear address which caused the page fault. since excep- tion 14 is classified as a fault, cs:eip will point to the instruction causing the page-fault. the 16-bit error code pushed as part of the page fault handler will contain status bits which indicate the cause of the page fault. the 16-bit error code is used by the operating sys- tem to determine how to handle the page fault. fig- ure 4.13 shows the format of the page fault error code and the interpretation of the bits. even though the bits in the error code (u/s, w/r, and p) have similar names as the bits in the page directory/ta- ble entries, the interpretation of the error code bits is different. figure 4.14 indicates what type of access caused the page fault. 15 3210 uw uuuuuuuuuuuuuueep sr figure 4.13. page fault error code format u/s : the u/s bit indicates whether the access causing the fault occurred when the processor was executing in user mode (u/s e 1) or in supervisor mode (u/s e 0) w/r : the w/r bit indicates whether the access causing the fault was a read (w/r e 0) or a write (w/r e 1) p : the p bit indicates whether a page fault was caused by a not-present page (p e 0), or by a page level protection violation (p e 1) u e undefined u/s w/r access type 0 0 supervisor * read 0 1 supervisor write 1 0 user read 1 1 user write * descriptor table access will fault with u/s e 0, even if the program is executing at level 3. figure 4.14. type of access causing page fault 35
intel386 tm sx microprocessor operating system responsibilities when the operating system enters or exits paging mode (by setting or resetting bit 31 in the cr0 regis- ter) a short jmp must be executed to flush the in- tel386 sx microprocessor's prefetch queue. this ensures that all instructions executed after the ad- dress mode change will generate correct addresses. the intel386 sx microprocessor takes care of the page address translation process, relieving the bur- den from an operating system in a demand-paged system. the operating system is responsible for set- ting up the initial page tables and handling any page faults. the operating system also is required to inval- idate (i.e. flush) the tlb when any changes are made to any of the page table entries. the operating system must reload cr3 to cause the tlb to be flushed. setting up the tables is simply a matter of loading cr3 with the address of the page directory, and allocating space for the page directory and the page tables. the primary responsibility of the oper- ating system is to implement a swapping policy and handle all of the page faults. a final concern of the operating system is to ensure that the tlb cache matches the information in the paging tables. in particular, any time the operating systems sets the p (present) bit of page table entry to zero. the tlb must be flushed by reloading cr3. operating systems may want to take advantage of the fact that cr3 is stored as part of a tss, to give every task or group of tasks its own set of page tables. 4.5 virtual 8086 environment the intel386 sx microprocessor allows the execu- tion of 8086 application programs in both real mode and in the virtual 8086 mode. the virtual 8086 mode allows the execution of 8086 applications, while still allowing the system designer to take full advantage of the intel386 sx cpu's protection mechanism. virtual 8086 addressing mechanism one of the major differences between intel386 sx cpu real and protected modes is how the segment selectors are interpreted. when the processor is ex- ecuting in virtual 8086 mode, the segment registers are used in a fashion identical to real mode. the contents of the segment register are shifted left 4 bits and added to the offset to form the segment base linear address. the intel386 sx microprocessor allows the operat- ing system to specify which programs use the 8086 address mechanism and which programs use pro- tected mode addressing on a per task basis. through the use of paging, the one megabyte ad- dress space of the virtual mode task can be mapped to anywhere in the 4 gigabyte linear address space of the intel386 sx microprocessor. like real mode, virtual mode addresses that exceed one megabyte will cause an exception 13. however, these restric- tions should not prove to be important, because most tasks running in virtual 8086 mode will simply be existing 8086 application programs. paging in virtual mode the paging hardware allows the concurrent running of multiple virtual mode tasks, and provides protec- tion and operating system isolation. although it is not strictly necessary to have the paging hardware enabled to run virtual mode tasks, it is needed in order to run multiple virtual mode tasks or to relo- cate the address space of a virtual mode task to physical address space greater than one megabyte. the paging hardware allows the 20-bit linear ad- dress produced by a virtual mode program to be divided into as many as 256 pages. each one of the pages can be located anywhere within the maximum 16 megabyte physical address space of the intel386 sx microprocessor. in addition, since cr3 (the page directory base register) is loaded by a task switch, each virtual mode task can use a different mapping scheme to map pages to different physical locations. finally, the paging hardware allows the sharing of the 8086 operating system code between multiple 8086 applications. protection and i/o permission bit map all virtual mode programs execute at privilege level 3. as such, virtual mode programs are subject to all of the protection checks defined in protected mode. this is different than real mode, which implicitly is executing at privilege level 0. thus, an attempt to execute a privileged instruction in virtual mode will cause an exception 13 fault. the following are privileged instructions, which may be executed only at privilege level 0. attempting to execute these instructions in virtual 8086 mode (or anytime cpl t 0) causes an exception 13 fault: lidt; mov drn,reg; mov reg,drn; lgdt; mov trn,reg; mov reg,trn; lmsw; mov crn,reg; mov reg,crn; clts; hlt; 36
intel386 tm sx microprocessor several instructions, particularly those applying to the multitasking and the protection model, are avail- able only in protected mode. therefore, attempting to execute the following instructions in real mode or in virtual 8086 mode generates an exception 6 fault: ltr; str; lldt; sldt; lar; verr; lsl; verw; arpl; the instructions which are iopl sensitive in protect- ed mode are: in; sti; out; cli ins; outs; rep ins; rep outs; in virtual 8086 mode the following instructions are iopl-sensitive: int n; sti; pushf; cli; popf; iret; the pushf, popf, and iret instructions are iopl- sensitive in virtual 8086 mode only. this provision allows the if flag to be virtualized to the virtual 8086 mode program. the int n software interrupt instruc- tion is also iopl-sensitive in virtual 8086 mode. note that the int 3, into, and bound instructions are not iopl-sensitive in virtual 8086 mode. the i/o instructions that directly refer to addresses in the processor's i/o space are in, ins, out, and outs. the intel386 sx microprocessor has the abil- ity to selectively trap references to specific i/o ad- dresses. the structure that enables selective trap- ping is the i/o permission bit map in the tss seg- ment (see figures 4.8 and 4.9). the i/o permission map is a bit vector. the size of the map and its loca- tion in the tss segment are variable. the processor locates the i/o permission map by means of the i/o map base field in the fixed portion of the tss. the i/o map base field is 16 bits wide and contains the offset of the beginning of the i/o permission map. in protected mode when an i/o instruction (in, ins, out or outs) is encountered, the processor first checks whether cpl s iopl. if this condition is true, the i/o operation may proceed. if not true, the proc- essor checks the i/o permission map (in virtual 8086 mode, the processor consults the map without regard for the iopl). each bit in the map corresponds to an i/o port byte address; for example, the bit for port 41 is found at i/o map base a 5, bit offset 1. the processor tests all the bits that correspond to the i/o addresses spanned by an i/o operation; for example, a double word operation tests four bits corresponding to four adjacent byte addresses. if any tested bit is set, the processor signals a general protection exception. if all the tested bits are zero, the i/o operations may proceed. it is not necessary for the i/o permission map to represent all the i/o addresses. i/o addresses not spanned by the map are treated as if they had one- bits in the map. the i/o map base should be at least one byte less than the tss limit, the last byte beyond the i/o mapping information must contain all 1's. because the i/o permission map is in the tss seg- ment, different tasks can have different maps. thus, the operating system can allocate ports to a task by changing the i/o permission map in the task's tss. important implementation note: beyond the last byte of i/o mapping information in the i/o permission bit map must be a byte containing all 1's. the byte of all 1's must be within the limit of the intel386 sx cpu tss segment (see figure 4.8). interrupt handling in order to fully support the emulation of an 8086 machine, interrupts in virtual 8086 mode are han- dled in a unique fashion. when running in virtual mode all interrupts and exceptions involve a privi- lege change back to the host intel386 sx microproc- essor operating system. the intel386 sx microproc- essor operating system determines if the interrupt comes from a protected mode application or from a virtual mode program by examining the vm bit in the eflags image stored on the stack. when a virtual mode program is interrupted and ex- ecution passes to the interrupt routine at level 0, the vm bit is cleared. however, the vm bit is still set in the eflag image on the stack. the intel386 sx microprocessor operating system in turn handles the exception or interrupt and then re- turns control to the 8086 program. the intel386 sx microprocessor operating system may choose to let the 8086 operating system handle the interrupt or it may emulate the function of the interrupt handler. for example, many 8086 operating system calls are accessed by pushing parameters on the stack, and then executing an int n instruction. if the iopl is set to 0 then all int n instructions will be intercepted by the intel386 sx microprocessor operating system. 37
intel386 tm sx microprocessor an intel386 sx microprocessor operating system can provide a virtual 8086 environment which is to- tally transparent to the application software by inter- cepting and then emulating 8086 operating system's calls, and intercepting in and out instructions. entering and leaving virtual 8086 mode virtual 8086 mode is entered by executing a 32-bit iret instruction at cpl e 0 where the stack has a 1 in the vm bit of its eflags image, or a task switch (at any cpl) to a intel386 sx microprocessor task whose intel386 sx cpu tss has a eflags image containing a 1 in the vm bit position while the proc- essor is executing in the protected mode. popf does not affect the vm bit but a pushf always pushes a 0 in the vm bit. the transition out of virtual 8086 mode to protected mode occurs only on receipt of an interrupt or ex- ception. in virtual 8086 mode, all interrupts and ex- ceptions vector through the protected mode idt, and enter an interrupt handler in protected mode. as part of the interrupt processing the vm bit is cleared. because the matching iret must occur from level 0, interrupt or trap gates used to field an interrupt or exception out of virtual 8086 mode must perform an inter-level interrupt only to level 0. interrupt or trap gates through conforming segments, or through segments with dpl l 0, will raise a gp fault with the cs selector as the error code. task switches to/from virtual 8086 mode tasks which can execute in virtual 8086 mode must be described by a tss with the intel386 sx cpu format (type 9 or 11 descriptor). a task switch out of virtual 8086 mode will operate exactly the same as any other task switch out of a task with a intel386 sx cpu tss. all of the programmer visible state, includ- ing the eflags register with the vm bit set to 1, is stored in the tss. the segment registers in the tss will contain 8086 segment base values rather than selectors. a task switch into a task described by a intel386 sx cpu tss will have an additional check to determine if the incoming task should be resumed in virtual 8086 mode. tasks described by 286 format tsss cannot be resumed in virtual 8086 mode, so no check is required there (the flags image in 286 format tss has only the low order 16 flags bits). before loading the segment register images from a intel386 sx cpu tss, the flags image is loaded, so that the segment registers are loaded from the tss image as 8086 segment base values. the task is now ready to resume in virtual 8086 mode. transitions through trap and interrupt gates, and iret a task switch is one way to enter or exit virtual 8086 mode. the other method is to exit through a trap or interrupt gate, as part of handling an interrupt, and to enter as part of executing an iret instruction. the transition out must use a intel386 sx cpu trap gate (type 14), or intel386 sx cpu interrupt gate (type 15), which must point to a non-conforming lev- el 0 segment (dpl e 0) in order to permit the trap handler to iret back to the virtual 8086 program. the gate must point to a non-conforming level 0 segment to perform a level switch to level 0 so that the matching iret can change the vm bit. intel386 sx cpu gates must be used since 286 gates save only the low 16 bits of the eflags register (the vm bit will not be saved). also, the 16-bit iret used to terminate the 286 interrupt handler will pop only the lower 16 bits from flags, and will not affect the vm bit. the action taken for a intel386 sx cpu trap or interrupt gate if an interrupt occurs while the task is executing in virtual 8086 mode is given by the follow- ing sequence: 1. save the flags register in a temp to push later. turn off the vm, tf, and if bits. 2. interrupt and trap gates must perform a level switch from 3 (where the virtual 8086 mode pro- gram executes) to level 0 (so iret can return). 3. push the 8086 segment register values onto the new stack, in this order: gs, fs, ds, es. these are pushed as 32-bit quantities. then load these 4 registers with null selectors (0). 4. push the old 8086 stack pointer onto the new stack by pushing the ss register (as 32-bits), then pushing the 32-bit esp register saved above. 5. push the 32-bit eflags register saved in step 1. 6. push the old 8086 instruction onto the new stack by pushing the cs register (as 32-bits), then push- ing the 32-bit eip register. 7. load up the new cs:eip value from the interrupt gate, and begin execution of the interrupt routine in protected mode. the transition out of v86 mode performs a level change and stack switch, in addition to changing back to protected mode. also all of the 8086 seg- ment register images are stored on the stack (be- hind the ss:esp image), and then loaded with null (0) selectors before entering the interrupt handler. this will permit the handler to safely save and re- store the ds, es, fs, and gs registers as 286 selec- tors. this is needed so that interrupt handlers which don't care about the mode of the interrupted pro- gram can use the same prologue and epilogue code for state saving regardless of whether or not a `na- tive` mode or virtual 8086 mode program was inter- 38
intel386 tm sx microprocessor rupted. restoring null selectors to these registers before executing the iret will cause a trap in the interrupt handler. interrupt routines which expect or return values in the segment registers will have to obtain/return values from the 8086 register images pushed onto the new stack. they will need to know the mode of the interrupted program in order to know where to find/return segment registers, and also to know how to interpret segment register val- ues. the iret instruction will perform the inverse of the above sequence. only the extended iret instruc- tion (operand size e 32) can be used and must be executed at level 0 to change the vm bit to 1. 1. if the nt bit in the flags register is on, an inter- task return is performed. the current state is stored in the current tss, and the link field in the current tss is used to locate the tss for the in- terrupted task which is to be resumed. otherwise, continue with the following sequence: 2. read the flags image from ss:8 [ esp ] into the flags register. this will set vm to the value ac- tive in the interrupted routine. 3. pop off the instruction pointer cs:eip. eip is popped first, then a 32-bit word is popped which contains the cs value in the lower 16 bits. if vm e 0, this cs load is done as a protected mode segment load. if vm e 1, this will be done as an 8086 segment load. 4. increment the esp register by 4 to bypass the flags image which was `popped` in step 1. 5. if vm e 1, load segment registers es, ds, fs, and gs from memory locations ss: [ esp a 8 ] , ss: [ esp a 12 ] , ss: [ esp a 16 ] , and ss: [ esp e 20 ] , respectively, where the new value of esp stored in step 4 is used. since vm e 1, these are done as 8086 segment register loads. else if vm e 0, check that the selectors in es, ds, fs, and gs are valid in the interrupted routine. null out invalid selectors to trap if an attempt is made to access through them. 6. if rpl(cs) l cpl, pop the stack pointer ss:esp from the stack. the esp register is popped first, followed by 32-bits containing ss in the lower 16 bits. if vm e 0, ss is loaded as a protected mode segment register load. if vm e 1, an 8086 seg- ment register load is used. 7. resume execution of the interrupted routine. the vm bit in the flags register (restored from the interrupt routine's stack image in step 1) deter- mines whether the processor resumes the inter- rupted routine in protected mode or virtual 8086 mode. 5.0 functional data the intel386 sx microprocessor features a straight- forward functional interface to the external hard- ware. the intel386 sx microprocessor has separate parallel buses for data and address. the data bus is 16-bits in width, and bi-directional. the address bus outputs 24-bit address values using 23 address lines and two byte enable signals. the intel386 sx microprocessor has two selectable address bus cycles: address pipelined and non-ad- dress pipelined. the address pipelining option al- lows as much time as possible for data access by starting the pending bus cycle before the present bus cycle is finished. a non-pipelined bus cycle gives the highest bus performance by executing ev- ery bus cycle in two processor clk cycles. for maxi- mum design flexibility, the address pipelining option is selectable on a cycle-by-cycle basis. the processor's bus cycle is the basic mechanism for information transfer, either from system to proc- essor, or from processor to system. intel386 sx mi- croprocessor bus cycles perform data transfer in a minimum of only two clock periods. the maximum transfer bandwidth at 16 mhz is therefore 16 mbytes/sec. however, any bus cycle will be extend- ed for more than two clock periods if external hard- ware withholds acknowledgement of the cycle. the intel386 sx microprocessor can relinquish con- trol of its local buses to allow mastership by other devices, such as direct memory access (dma) chan- nels. when relinquished, hlda is the only output pin driven by the intel386 sx microprocessor, providing near-complete isolation of the processor from its system (all other output pins are in a float condition). 5.1 signal description overview ahead is a brief description of the intel386 sx micro- processor input and output signals arranged by func- tional groups. note the y symbol at the end of a signal name indicates the active, or asserted, state occurs when the signal is at a low voltage. when no y is present after the signal name, the signal is asserted when at the high voltage level. example signal: m/io y e high voltage indicates memory selected e low voltage indicates i/o selected the signal descriptions sometimes refer to ac tim- ing parameters, such as `t 25 reset setup time` and `t 26 reset hold time.` the values of these parame- ters can be found in table 7.4. 39
intel386 tm sx microprocessor clock (clk2) clk2 provides the fundamental timing for the intel386 sx microprocessor. it is divided by two in- ternally to generate the internal processor clock used for instruction execution. the internal clock is comprised of two phases, `phase one` and `phase two`. each clk2 period is a phase of the internal clock. figure 5.2 illustrates the relationship. if de- sired, the phase of the internal processor clock can be synchronized to a known phase by ensuring the falling edge of the reset signal meets the applica- ble setup and hold times t 25 and t 26 . data bus (d 15 d 0 ) these three-state bidirectional signals provide the general purpose data path between the intel386 sx microprocessor and other devices. the data bus outputs are active high and will float during bus hold acknowledge. data bus reads require that read- data setup and hold times t 21 and t 22 be met relative to clk2 for correct operation. 240187 16 figure 5.1. functional signal groups 240187 17 figure 5.2. clk2 signal and internal processor clock 40
intel386 tm sx microprocessor address bus (a 23 a 1 , bhe y , ble y ) these three-state outputs provide physical memory addresses or i/o port addresses. a 23 a 16 are low during i/o transfers except for i/o transfers auto- matically generated by coprocessor instructions. during coprocessor i/o transfers, a 22 a 16 are driv- en low, and a 23 is driven high so that this ad- dress line can be used by external logic to generate the coprocessor select signal. thus, the i/o address driven by the intel386 sx microprocessor for co- processor commands is 8000f8h, the i/o address- es driven by the intel386 sx microprocessor for co- processor data are 8000fch or 8000feh for cycles to the intel387 tm sx. the address bus is capable of addressing 16 mega- bytes of physical memory space (000000h through ffffffh), and 64 kilobytes of i/o address space (000000h through 00ffffh) for programmed i/o. the address bus is active high and will float during bus hold acknowledge. the byte enable outputs, bhe y and ble y , directly indicate which bytes of the 16-bit data bus are in- volved with the current transfer. bhe y applies to d 15 d 8 and ble y applies to d 7 d 0 . if both bhe y and ble y are asserted, then 16 bits of data are being transferred. see table 5.1 for a complete de- coding of these signals. the byte enables are active low and will float during bus hold acknowledge. bus cycle definition signals (w/r y , d/c y , m/io y , lock y ) these three-state outputs define the type of bus cy- cle being performed: w/r y distinguishes between write and read cycles, d/c y distinguishes between data and control cycles, m/io y distinguishes be- tween memory and i/o cycles, and lock y distin- guishes between locked and unlocked bus cycles. all of these signals are active low and will float during bus acknowledge. the primary bus cycle definition signals are w/r y , d/c y and m/io y , since these are the signals driv- en valid as ads y (address status output) becomes active. the lock y is driven valid at the same time the bus cycle begins, which due to address pipelin- ing, could be after ads y becomes active. exact bus cycle definitions, as a function of w/r y , d/c y , and m/io y are given in table 5.2. lock y indicates that other system bus masters are not to gain control of the system bus while it is ac- tive. lock y is activated on the clk2 edge that be- gins the first locked bus cycle (i.e., it is not active at the same time as the other bus cycle definition pins) and is deactivated when ready is returned at the end of the last bus cycle which is to be locked. the be- ginning of a bus cycle is determined when ready y is returned in a previous bus cycle and another is pending (ads y is active) or by the clock edge in which ads y is driven active if the bus was idle. this means that it follows more closely with the write data rules when it is valid, but may cause the bus to be locked longer than desired. the lock y signal may be explicitly activated by the lock prefix on certain instructions. lock y is always asserted when executing the xchg instruction, during de- scriptor updates, and during the interrupt acknowl- edge sequence. table 5.1. byte enable definitions bhe y ble y function 0 0 word transfer 0 1 byte transfer on upper byte of the data bus, d 15 d 8 1 0 byte transfer on lower byte of the data bus, d 7 d 0 1 1 never occurs table 5.2. bus cycle definition m/io y d/c y w/r y bus cycle type locked? 0 0 0 interrupt acknowledge yes 0 0 1 does not occur e 0 1 0 i/o data read no 0 1 1 i/o data write no 1 0 0 memory code read no 1 0 1 halt: shutdown: no address e 2 address e 0 bhe y e 1 bhe y e 1 ble y e 0 ble y e 0 1 1 0 memory data read some cycles 1 1 1 memory data write some cycles 41
intel386 tm sx microprocessor bus control signals (ads y , ready y ,na y ) the following signals allow the processor to indicate when a bus cycle has begun, and allow other system hardware to control address pipelining and bus cycle termination. address status (ads y ) this three-state output indicates that a valid bus cy- cle definition and address (w/r y , d/c y , m/io y , bhe y , ble y and a 23 a 1 ) are being driven at the intel386 sx microprocessor pins. ads y is an active low output. once ads y is driven active, valid ad- dress, byte enables, and definition signals will not change. in addition, ads y will remain active until its associated bus cycle begins (when ready y is re- turned for the previous bus cycle when running pipe- lined bus cycles). when address pipelining is uti- lized, maximum throughput is achieved by initiating bus cycles when ads y and ready y are active in the same clock cycle. ads y will float during bus hold acknowledge. see sections non-pipelined ad- dress and pipelined address for additional infor- mation on how ads y is asserted for different bus states. transfer acknowledge (ready y ) this input indicates the current bus cycle is com- plete, and the active bytes indicated by bhe y and ble y are accepted or provided. when ready y is sampled active during a read cycle or interrupt ac- knowledge cycle, the intel386 sx microprocessor latches the input data and terminates the cycle. when ready y is sampled active during a write cy- cle, the processor terminates the bus cycle. ready y is ignored on the first bus state of all bus cycles, and sampled each bus state thereafter until asserted. ready y must eventually be asserted to acknowledge every bus cycle, including halt indica- tion and shutdown indication bus cycles. when be- ing sampled, ready y must always meet setup and hold times t 19 and t 20 for correct operation. next address request (na y ) this is used to request address pipelining. this input indicates the system is prepared to accept new val- ues of bhe y , ble y ,a 23 a 1 , w/r y , d/c y and m/io y from the intel386 sx microprocessor even if the end of the current cycle is not being acknowl- edged on ready y . if this input is active when sam- pled, the next address is driven onto the bus, provid- ed the next bus request is already pending internally. na y is ignored in clk cycles in which ads y or ready y is activated. this signal is active low and must satisfy setup and hold times t 15 and t 16 for correct operation. see pipelined address and read and write cycles for additional information. bus arbitration signals (hold, hlda) this section describes the mechanism by which the processor relinquishes control of its local buses when requested by another bus master device. see entering and exiting hold acknowledge for addi- tional information. bus hold request (hold) this input indicates some device other than the intel386 sx microprocessor requires bus master- ship. when control is granted, the intel386 sx mi- croprocessor floats a 23 a 1 , bhe y , ble y ,d 15 d 0 , lock y , m/io y , d/c y , w/r y and ads y , and then activates hlda, thus entering the bus hold ac- knowledge state. the local bus will remain granted to the requesting master until hold becomes inac- tive. when hold becomes inactive, the intel386 sx microprocessor will deactivate hlda and drive the local bus (at the same time), thus terminating the hold acknowledge condition. hold must remain asserted as long as any other device is a local bus master. external pull-up resis- tors may be required when in the hold acknowledge state since none of the intel386 sx microprocessor floated outputs have internal pull-up resistors. see resistor recommendations for additional informa- tion. hold is not recognized while reset is active. if reset is asserted while hold is asserted, re- set has priority and places the bus into an idle state, rather than the hold acknowledge (high-im- pedance) state. hold is a level-sensitive, active high, synchronous input. hold signals must always meet setup and hold times t 23 and t 24 for correct operation. bus hold acknowledge (hlda) when active (high), this output indicates the intel386 sx microprocessor has relinquished control of its local bus in response to an asserted hold signal, and is in the bus hold acknowledge state. the bus hold acknowledge state offers near-com- plete signal isolation. in the hold acknowledge state, hlda is the only signal being driven by the intel386 sx microprocessor. the other output sig- nals or bidirectional signals (d 15 d 0 , bhe y , ble y , a 23 a 1 , w/r y , d/c y , m/io y , lock y and ads y ) are in a high-impedance state so the re- 42
intel386 tm sx microprocessor questing bus master may control them. these pins remain off throughout the time that hlda remains active (see table 5.3)). pull-up resistors may be de- sired on several signals to avoid spurious activity when no bus master is driving them. see resistor recommendations for additional information. when the hold signal is made inactive, the intel386 sx microprocessor will deactivate hlda and drive the bus. one rising edge on the nmi input is remembered for processing after the hold input is negated. table 5.3. output pin state during hold pin value pin names 1 hlda float lock y , m/io y , d/c y , w/r y , ads y ,a 23 a 1 , bhe y , ble y ,d 15 d 0 in addition to the normal usage of hold acknowl- edge with dma controllers or master peripherals, the near-complete isolation has particular attractive- ness during system test when test equipment drives the system, and in hardware fault-tolerant applica- tions. hold latencies the maximum possible hold latency depends on the software being executed. the actual hold la- tency at any time depends on the current bus activi- ty, the state of the lock y signal (internal to the cpu) activated by the lock y prefix, and interrupts. the intel386 sx microprocessor will not honor a hold request until the current bus operation is complete. the intel386 sx microprocessor breaks 32-bit data or i/o accesses into 2 internally locked 16-bit bus cycles; the lock y signal is not asserted. the intel386 sx microprocessor breaks unaligned 16-bit or 32-bit data or i/o accesses into 2 or 3 internally locked 16-bit bus cycles. again, the lock y signal is not asserted but a hold request will not be recog- nized until the end of the entire transfer. wait states affect hold latency. the intel386 sx microprocessor will not honor a hold request until the end of the current bus operation, no matter how many wait states are required. systems with dma where data transfer is critical must insure that ready y returns sufficiently soon. coprocessor interface signals (pereq, busy y , error y ) in the following sections are descriptions of signals dedicated to the numeric coprocessor interface. in addition to the data bus, address bus, and bus cycle definition signals, these following signals control communication between the intel386 sx microproc- essor and its intel387 tm sx processor extension. coprocessor request (pereq) when asserted (high), this input signal indicates a coprocessor request for a data operand to be trans- ferred to/from memory by the intel386 sx micro- processor. in response, the intel386 sx microproc- essor transfers information between the coproces- sor and memory. because the intel386 sx micro- processor has internally stored the coprocessor op- code being executed, it performs the requested data transfer with the correct direction and memory ad- dress. pereq is a level-sensitive active high asynchro- nous signal. setup and hold times, t 29 and t 30 , rela- tive to the clk2 signal must be met to guarantee recognition at a particular clock edge. this signal is provided with a weak internal pull-down resistor of around 20 k-ohms to ground so that it will not float active when left unconnected. coprocessor busy (busy y ) when asserted (low), this input indicates the co- processor is still executing an instruction, and is not yet able to accept another. when the intel386 sx microprocessor encounters any coprocessor in- struction which operates on the numerics stack (e.g. load, pop, or arithmetic operation), or the wait in- struction, this input is first automatically sampled un- til it is seen to be inactive. this sampling of the busy y input prevents overrunning the execution of a previous coprocessor instruction. the fninit, fnstenv, fnsave, fnstsw, fnstcw and fnclex coprocessor instructions are allowed to execute even if busy y is active, since these instructions are used for coprocessor initializa- tion and exception-clearing. busy y is an active low, level-sensitive asynchro- nous signal. setup and hold times, t 29 and t 30 , rela- 43
intel386 tm sx microprocessor tive to the clk2 signal must be met to guarantee recognition at a particular clock edge. this pin is pro- vided with a weak internal pull-up resistor of around 20 k-ohms to vcc so that it will not float active when left unconnected. busy y serves an additional function. if busy y is sampled low at the falling edge of reset, the intel386 sx microprocessor performs an internal self-test (see bus activity during and following reset . if busy y is sampled high, no self-test is performed. coprocessor error (error y ) when asserted (low), this input signal indicates that the previous coprocessor instruction generated a coprocessor error of a type not masked by the coprocessor's control register. this input is automat- ically sampled by the intel386 sx microprocessor when a coprocessor instruction is encountered, and if active, the intel386 sx microprocessor generates exception 16 to access the error-handling software. several coprocessor instructions, generally those which clear the numeric error flags in the coproces- sor or save coprocessor state, do execute without the intel386 sx microprocessor generating excep- tion 16 even if error y is active. these instruc- tions are fninit, fnclex, fnstsw, fnstswax, fnstcw, fnstenv and fnsave. error y is an active low, level-sensitive asyn- chronous signal. setup and hold times, t 29 and t 30 , relative to the clk2 signal must be met to guarantee recognition at a particular clock edge. this pin is pro- vided with a weak internal pull-up resistor of around 20 k-ohms to vcc so that it will not float active when left unconnected. interrupt signals (intr, nmi, reset) the following descriptions cover inputs that can in- terrupt or suspend execution of the processor's cur- rent instruction stream. maskable interrupt request (intr) when asserted, this input indicates a request for in- terrupt service, which can be masked by the intel386 sx cpu flag register if bit. when the intel386 sx microprocessor responds to the intr input, it per- forms two interrupt acknowledge bus cycles and, at the end of the second, latches an 8-bit interrupt vec- tor on d 7 d 0 to identify the source of the interrupt. intr is an active high, level-sensitive asynchro- nous signal. setup and hold times, t 27 and t 28 , rela- tive to the clk2 signal must be met to guarantee recognition at a particular clock edge. to assure rec- ognition of an intr request, intr should remain active until the first interrupt acknowledge bus cycle begins. intr is sampled at the beginning of every instruction in the intel386 sx microprocessor's exe- cution unit. in order to be recognized at a particular instruction boundary, intr must be active at least eight clk2 clock periods before the beginning of the instruction. if recognized, the intel386 sx microproc- essor will begin execution of the interrupt. non-maskable interrupt request (nmi)) this input indicates a request for interrupt service which cannot be masked by software. the non- maskable interrupt request is always processed ac- cording to the pointer or gate in slot 2 of the interrupt table. because of the fixed nmi slot assignment, no interrupt acknowledge cycles are performed when processing nmi. nmi is an active high, rising edge-sensitive asyn- chronous signal. setup and hold times, t 27 and t 28 , relative to the clk2 signal must be met to guarantee recognition at a particular clock edge. to assure rec- ognition of nmi, it must be inactive for at least eight clk2 periods, and then be active for at least eight clk2 periods before the beginning of the instruction boundary in the intel386 sx microprocessor's exe- cution unit. once nmi processing has begun, no additional nmi's are processed until after the next iret in- struction, which is typically the end of the nmi serv- ice routine. if nmi is re-asserted prior to that time, however, one rising edge on nmi will be remem- bered for processing after executing the next iret instruction. interrupt latency the time that elapses before an interrupt request is serviced (interrupt latency) varies according to sev- eral factors. this delay must be taken into account by the interrupt source. any of the following factors can affect interrupt latency: 1. if interrupts are masked, an intr request will not be recognized until interrupts are reenabled. 2. if an nmi is currently being serviced, an incoming nmi request will not be recognized until the intel386 sx microprocessor encounters the iret instruction. 3. an interrupt request is recognized only on an in- struction boundary of the intel386 sx microproc- essor's execution unit except for the following cases: e repeat string instructions can be interrupted after each iteration. 44
intel386 tm sx microprocessor e if the instruction loads the stack segment reg- ister, an interrupt is not processed until after the following instruction, which should be an esp. this allows the entire stack pointer to be loaded without interruption. e if an instruction sets the interrupt flag (enabling interrupts), an interrupt is not processed until after the next instruction. the longest latency occurs when the interrupt re- quest arrives while the intel386 sx microproces- sor is executing a long instruction such as multipli- cation, division, or a task-switch in the protected mode. 4. saving the flags register and cs:eip registers. 5. if interrupt service routine requires a task switch, time must be allowed for the task switch. 6. if the interrupt service routine saves registers that are not automatically saved by the intel386 sx microprocessor. reset this input signal suspends any operation in progress and places the intel386 sx microprocessor in a known reset state. the intel386 sx microprocessor is reset by asserting reset for 15 or more clk2 periods (80 or more clk2 periods before requesting self-test). when reset is active, all other input pins, except flt y , are ignored, and all other bus pins are driven to an idle bus state as shown in table 5.5. if reset and hold are both active at a point in time, reset takes priority even if the intel386 sx micro- processor was in a hold acknowledge state prior to reset active. reset is an active high, level-sensitive synchro- nous signal. setup and hold times, t 25 and t 26 , must be met in order to assure proper operation of the intel386 sx microprocessor. table 5.5. pin state (bus idle) during reset pin name signal level during reset ads y 1 d 15 d 0 float bhe y , ble y 0 a 23 a 1 1 w/r y 0 d/c y 1 m/io y 0 lock y 1 hlda 0 5.2 bus transfer mechanism all data transfers occur as a result of one or more bus cycles. logical data operands of byte and word lengths may be transferred without restrictions on physical address alignment. any byte boundary may be used, although two physical bus cycles are per- formed as required for unaligned operand transfers. the intel386 sx microprocessor address signals are designed to simplify external system hardware. higher-order address bits are provided by a 23 a 1 . bhe y and ble y provide linear selects for the two bytes of the 16-bit data bus. byte enable outputs bhe y and ble y are asserted when their associated data bus bytes are involved with the present bus cycle, as listed in table 5.6. table 5.6. byte enables and associated data and operand bytes byte enable associated data bus signals signal ble y d 7 d 0 (byt e 0 e least significant) bhe y d 15 d 8 (byt e 1 e most significant) each bus cycle is composed of at least two bus states. each bus state requires one processor clock period. additional bus states added to a single bus cycle are called wait states. see section 5.4 bus functional description . 5.3 memory and i/o spaces bus cycles may access physical memory space or i/o space. peripheral devices in the system may ei- ther be memory-mapped, or i/o-mapped, or both. as shown in figure 5.3, physical memory addresses range from 000000h to 0ffffffh (16 megabytes) and i/o addresses from 000000h to 00ffffh (64 kilobytes). note the i/o addresses used by the automatic i/o cycles for coprocessor communica- tion are 8000f8h to 8000ffh, beyond the address range of programmed i/o, to allow easy generation of a coprocessor chip select signal using the a 23 and m/io y signals. 5.4 bus functional description the intel386 sx microprocessor has separate, par- allel buses for data and address. the data bus is 16- bits in width, and bidirectional. the address bus pro- vides a 24-bit value using 23 signals for the 23 up- per-order address bits and 2 byte enable signals to directly indicate the active bytes. these buses are interpreted and controlled by several definition sig- nals. the definition of each bus cycle is given by three signals: m/io y , w/r y and d/c y . at the same time, a valid address is present on the byte enable signals, bhe y and ble y , and the other address signals a 23 a 1 . a status signal, ads y , indicates 45
intel386 tm sx microprocessor note: 240187 18 since a23 is high during automatic communication with coprocessor, a23 high and m/io y low can be used to easily generate a coprocessor select signal. figure 5.3. physical memory and i/o spaces 240187 19 fastest non-pipelined bus cycles consist of t1 and t2 figure 5.4. fastest read cycles with non-pipelined address timing 46
intel386 tm sx microprocessor when the intel386 sx microprocessor issues a new bus cycle definition and address. collectively, the address bus, data bus and all asso- ciated control signals are referred to simply as `the bus'. when active, the bus performs one of the bus cycles below: 1. read from memory space 2. locked read from memory space 3. write to memory space 4. locked write to memory space 5. read from i/o space (or coprocessor) 6. write to i/o space (or coprocessor) 7. interrupt acknowledge (always locked) 8. indicate halt, or indicate shutdown table 5.2 shows the encoding of the bus cycle defi- nition signals for each bus cycle. see bus cycle definition signals for additional information. when the intel386 sx microprocessor bus is not performing one of the activities listed above, it is ei- ther idle or in the hold acknowledge state, which may be detected externally. the idle state can be identified by the intel386 sx microprocessor giving no further assertions on its address strobe output (ads y ) since the beginning of its most recent bus cycle, and the most recent bus cycle having been terminated. the hold acknowledge state is identified by the intel386 sx microprocessor asserting its hold acknowledge (hlda) output. the shortest time unit of bus activity is a bus state. a bus state is one processor clock period (two clk2 periods) in duration. a complete data transfer occurs during a bus cycle, composed of two or more bus states. the fastest intel386 sx microprocessor bus cycle requires only two bus states. for example, three consecutive bus read cycles, each consisting of two bus states, are shown by figure 5.4. the bus states in each cycle are named t1 and t2. any memory or i/o address may be accessed by such a two-state bus cycle, if the external hardware is fast enough. 240187 20 fastest pipelined bus cycles consist of t1p and t2p figure 5.5. fastest read cycles with pipelined address timing 47
intel386 tm sx microprocessor every bus cycle continues until it is acknowledged by the external system hardware, using the intel386 sx microprocessor ready y input. acknowledging the bus cycle at the end of the first t2 results in the shortest bus cycle, requiring only t1 and t2. if ready y is not immediately asserted however, t2 states are repeated indefinitely until the ready y input is sampled active. the address pipelining option provides a choice of bus cycle timings. pipelined or non-pipelined ad- dress timing is selectable on a cycle-by-cycle basis with the next address (na y ) input. when address pipelining is selected the address (bhe y , ble y and a 23 a 1 ) and definition (w/r y , d/c y , m/io y and lock y ) of the next cycle are available before the end of the current cycle. to sig- nal their availability, the intel386 sx microprocessor address status output (ads y ) is asserted. figure 5.5 illustrates the fastest read cycles with pipelined address timing. note from figure 5.5 the fastest bus cycles using pipelined address require only two bus states, named t1p and t2p . therefore cycles with pipe- lined address timing allow the same data bandwidth as non-pipelined cycles, but address-to-data access time is increased by one t-state time compared to that of a non-pipelined cycle. read and write cycles data transfers occur as a result of bus cycles, classi- fied as read or write cycles. during read cycles, data is transferred from an external device to the proces- sor. during write cycles, data is transferred from the processor to an external device. 240187 21 idle states are shown here for diagram variety only. write cycles are not always followed by an idle state. an active bus cycle can immediately follow the write cycle. figure 5.6. various bus cycles with non-pipelined address (zero wait states) 48
intel386 tm sx microprocessor two choices of address timing are dynamically se- lectable: non-pipelined or pipelined. after an idle bus state, the processor always uses non-pipelined ad- dress timing. however the na y (next address) in- put may be asserted to select pipelined address tim- ing for the next bus cycle. when pipelining is select- ed and the intel386 sx microprocessor has a bus request pending internally, the address and defini- tion of the next cycle is made available even before the current bus cycle is acknowledged by ready y . terminating a read or write cycle, like any bus cycle, requires acknowledging the cycle by asserting the ready y input. until acknowledged, the processor inserts wait states into the bus cycle, to allow adjust- ment for the speed of any external device. external hardware, which has decoded the address and bus cycle type, asserts the ready y input at the appro- priate time. at the end of the second bus state within the bus cycle, ready y is sampled. at that time, if external hardware acknowledges the bus cycle by asserting ready y , the bus cycle terminates as shown in fig- ure 5.6. if ready y is negated as in figure 5.7, the intel386 sx microprocessor executes another bus state (a wait state) and ready y is sampled again at the end of that state. this continues indefinitely until the cycle is acknowledged by ready y assert- ed. when the current cycle is acknowledged, the intel386 sx microprocessor terminates it. when a read cycle is acknowledged, the intel386 sx micro- processor latches the information present at its data pins. when a write cycle is acknowledged, the intel386 sx cpu's write data remains valid through- out phase one of the next bus state, to provide write data hold time. 240187 22 idle states are shown here for diagram variety only. write cycles are not always followed by an idle state. an active bus cycle can immediately follow the write cycle. figure 5.7. various bus cycles with non-pipelined address (various number of wait states) 49
intel386 tm sx microprocessor non-pipelined address any bus cycle may be performed with non-pipelined address timing. for example, figure 5.6 shows a mixture of read and write cycles with non-pipelined address timing. figure 5.6 shows that the fastest possible cycles with non-pipelined address have two bus states per bus cycle. the states are named t1 and t2. in phase one of t1, the address signals and bus cycle definition signals are driven valid and, to signal their availability, address strobe (ads y )is simultaneously asserted. during read or write cycles, the data bus behaves as follows. if the cycle is a read, the intel386 sx micro- processor floats its data signals to allow driving by the external device being addressed. the intel386 sx microprocessor requires that all data bus pins be at a valid logic state (high or low) at the end of each read cycle, when ready y is asserted. the system must be designed to meet this requirement. if the cycle is a write, data signals are driven by the intel386 sx microproces- sor beginning in phase two of t1 until phase one of the bus state following cycle acknowledgment. figure 5.7 illustrates non-pipelined bus cycles with one wait state added to cycles 2 and 3. ready y is sampled inactive at the end of the first t2 in cycles 2 and 3. therefore cycles 2 and 3 have t2 repeated again. at the end of the second t2, ready y is sampled active. when address pipelining is not used, the address and bus cycle definition remain valid during all wait states. when wait states are added and it is desir- able to maintain non-pipelined address timing, it is necessary to negate na y during each t2 state ex- cept the last one, as shown in figure 5.7 cycles 2 and 3. if na y is sampled active during a t2 other than the last one, the next state would be t2i or t2p instead of another t2. when address pipelining is not used, the bus states and transitions are completely illustrated by figure 5.8. the bus transitions between four possible states, t1, t2, t i , and t h . bus cycles consist of t1 and t2, with t2 being repeated for wait states. oth- erwise the bus may be idle, t i , or in the hold ac- knowledge state t h . 240187 23 bus states: t1efirst clock of a non-pipelined bus cycle (intel386 tm sx cpu drives new address and asserts ads y ). t2esubsequent clocks of a bus cycle when na y has not been sampled asserted in the current bus cycle. tieidle state. thehold acknowledge state (intel386 sx cpu asserts hlda). the fastest bus cycle consists of two states t1 and t2. four basic bus states describe bus operation when not using pipelined address. figure 5.8. bus states (not using pipelined address) 50
intel386 tm sx microprocessor bus cycles always begin with t1. t1 always leads to t2. if a bus cycle is not acknowledged during t2 and na y is inactive, t2 is repeated. when a cycle is acknowledged during t2, the following state will be t1 of the next bus cycle if a bus request is pending internally, or t i if there is no bus request pending, or t h if the hold input is being asserted. use of pipelined address allows the intel386 sx mi- croprocessor to enter three additional bus states not shown in figure 5.8. figure 5.12 is the complete bus state diagram, including pipelined address cycles. pipelined address address pipelining is the option of requesting the address and the bus cycle definition of the next in- ternally pending bus cycle before the current bus cycle is acknowledged with ready y asserted. ads y is asserted by the intel386 sx microproces- sor when the next address is issued. the address pipelining option is controlled on a cycle-by-cycle basis with the na y input signal. once a bus cycle is in progress and the current ad- dress has been valid for at least one entire bus state, the na y input is sampled at the end of every phase one until the bus cycle is acknowledged. dur- ing non-pipelined bus cycles na y is sampled at the end of phase one in every t2. an example is cycle 2 in figure 5.9, during which na y is sampled at the end of phase one of every t2 (it was asserted once during the first t2 and has no further effect during that bus cycle). 240187 24 following any idle bus state (ti), addresses are non-pipelined. within non-pipelined bus cycles, na y is only sampled during wait states. therefore, to begin address pipelining during a group of non-pipelined bus cycles requires a non-pipe- lined cycle with at least one wait state (cycle 2 above). figure 5.9. transitioning to pipelined address during burst of bus cycles 51
intel386 tm sx microprocessor if na y is sampled active, the intel386 sx micro- processor is free to drive the address and bus cycle definition of the next bus cycle, and assert ads y , as soon as it has a bus request internally pending. it may drive the next address as early as the next bus state, whether the current bus cycle is acknowl- edged at that time or not. regarding the details of address pipelining, the intel386 sx microprocessor has the following char- acteristics: 1. the next address may appear as early as the bus state after na y was sampled active (see figures 5.9 or 5.10). in that case, state t2p is entered immediately. however, when there is not an inter- nal bus request already pending, the next address will not be available immediately after na y is as- serted and t2i is entered instead of t2p (see fig- ure 5.11 cycle 3). provided the current bus cycle isn't yet acknowledged by ready y asserted, t2p will be entered as soon as the intel386 sx microprocessor does drive the next address. ex- ternal hardware should therefore observe the ads y output as confirmation the next address is actually being driven on the bus. 2. any address which is validated by a pulse on the ads y output will remain stable on the address pins for at least two processor clock periods. the intel386 sx microprocessor cannot produce a new address more frequently than every two processor clock periods (see figures 5.9, 5.10, and 5.11). 3. only the address and bus cycle definition of the very next bus cycle is available. the pipelining ca- pability cannot look further than one bus cycle ahead (see figure 5.11 cycle 1). 240187 25 following any bus state (ti) the address is always non-pipelined and na y is only sampled during wait states. to start address pipelining after an idle state requires a non-pipelined cycle with at least one wait state (cycle 1 above) the pipelined cycles (2, 3, 4 above) are shown with various numbers of wait states. figure 5.10. fastest transition to pipelined address following idle bus state 52
intel386 tm sx microprocessor the complete bus state transition diagram, including operation with pipelined address is given by figure 5.12. note it is a superset of the diagram for non- pipelined address only, and the three additional bus states for pipelined address are drawn in bold. the fastest bus cycle with pipelined address con- sists of just two bus states, t1p and t2p (recall for non-pipelined address it is t1 and t2). t1p is the first bus state of a pipelined cycle. 240187 26 figure 5.11. details of address pipelining during cycles with wait states 53
intel386 tm sx microprocessor bus states: t1efirst clock of a non-pipelined bus cycle (intel386 tm sx cpu drives new address and asserts ads y ). t2esubsequent clocks of a bus cycle when na y has not been sampled asserted in the current bus cycle. t2iesubsequent clocks of a bus cycle when na y has been sampled asserted in the current bus cycle but there is not yet an internal bus request pending (intel386 sx cpu will not drive new address or assert ads y ). t2pesubsequent clocks of a bus cycle when na y has been sampled asserted in the current bus cycle and there is an inter- nal bus request pending (intel386 sx cpu drives new address and asserts ads y ). t1pefirst clock of a pipelined bus cycle. tieidle state. 240187 27 thehold acknowledge state (intel386 sx cpu asserts hlda). asserting na y for pipelined address gives access to three more bus states: t2i, t2p and t1p. using pipelined address, the fastest bus cycle consists of t1p and t2p. figure 5.12. complete bus states (including pipelined address) 54
intel386 tm sx microprocessor initiating and maintaining pipelined address using the state diagram figure 5.12, observe the transitions from an idle state, t i , to the beginning of a pipelined bus cycle t1p. from an idle state, t i , the first bus cycle must begin with t1, and is therefore a non-pipelined bus cycle. the next bus cycle will be pipelined, however, provided na y is asserted and the first bus cycle ends in a t2p state (the address for the next bus cycle is driven during t2p). the fast- est path from an idle state to a bus cycle with pipe- lined address is shown in bold below: t i ,t i ,t i , t1 - t2 - t2p, t1p - t2p, idle non-pipelined pipelined states cycle cycle t1-t2-t2p are the states of the bus cycle that es- tablish address pipelining for the next bus cycle, which begins with t1p. the same is true after a bus hold state, shown below: t h ,t h ,t h , t1 - t2 - t2p, t1p - t2p, hold acknowledge non-pipelined pipelined states cycle cycle the transition to pipelined address is shown func- tionally by figure 5.10 cycle 1. note that cycle 1 is used to transition into pipelined address timing for the subsequent cycles 2, 3 and 4, which are pipe- lined. the na y input is asserted at the appropriate time to select address pipelining for cycles 2, 3 and 4. once a bus cycle is in progress and the current ad- dress has been valid for one entire bus state, the na y input is sampled at the end of every phase one until the bus cycle is acknowledged. sampling be- gins in t2 during cycle 1 in figure 5.10. once na y is sampled active during the current cycle, the intel386 sx microprocessor is free to drive a new address and bus cycle definition on the bus as early as the next bus state. in figure 5.10 cycle 1 for example, the next address is driven during state t2p. thus cycle 1 makes the transition to pipelined address timing, since it begins with t1 but ends with t2p. because the address for cycle 2 is available before cycle 2 begins, cycle 2 is called a pipelined bus cycle, and it begins with t1p. cycle 2 begins as soon as ready y asserted terminates cycle 1. examples of transition bus cycles are figure 5.10 cycle 1 and figure 5.9 cycle 2. figure 5.10 shows transition during the very first cycle after an idle bus state, which is the fastest possible transition into ad- dress pipelining. figure 5.9 cycle 2 shows a tran- sition cycle occurring during a burst of bus cycles. in any case, a transition cycle is the same whenever it occurs: it consists at least of t1, t2 (na y is assert- ed at that time), and t2p (provided the intel386 sx microprocessor has an internal bus request already pending, which it almost always has). t2p states are repeated if wait states are added to the cycle. note that only three states (t1, t2 and t2p) are required in a bus cycle performing a transition from non-pipelined address into pipelined address timing, for example figure 5.10 cycle 1. figure 5.10 cycles 2, 3 and 4 show that address pipelining can be main- tained with two-state bus cycles consisting only of t1p and t2p. once a pipelined bus cycle is in progress, pipelined timing is maintained for the next cycle by asserting na y and detecting that the intel386 sx microproc- essor enters t2p during the current bus cycle. the current bus cycle must end in state t2p for pipelin- ing to be maintained in the next cycle. t2p is identi- fied by the assertion of ads y . figures 5.9 and 5.10 however, each show pipelining ending after cycle 4 because cycle 4 ends in t2i. this indicates the intel386 sx microprocessor didn't have an internal bus request prior to the acknowledgement of cycle 4. if a cycle ends with a t2 or t2i, the next cycle will not be pipelined. realistically, address pipelining is almost always maintained as long as na y is sampled asserted. this is so because in the absence of any other re- quest, a code prefetch request is always internally pending until the instruction decoder and code pre- fetch queue are completely full. therefore, address pipelining is maintained for long bursts of bus cycles, if the bus is available (i.e., hold inactive) and na y is sampled active in each of the bus cycles. 55
intel386 tm sx microprocessor interrupt acknowledge (inta) cycles in response to an interrupt request on the intr in- put when interrupts are enabled, the intel386 sx mi- croprocessor performs two interrupt acknowledge cycles. these bus cycles are similar to read cycles in that bus definition signals define the type of bus activity taking place, and each cycle continues until acknowledged by ready y sampled active. the state of a 2 distinguishes the first and second interrupt acknowledge cycles. the byte address driven during the first interrupt acknowledge cycle is 4(a 23 a 3 ,a 1 , ble y low, a 2 and bhe y high). the byte address driven during the second interrupt acknowledge cycle is 0 (a 23 a 1 , ble y low, and bhe y high). the lock y output is asserted from the beginning of the first interrupt acknowledge cycle until the end of the second interrupt acknowledge cycle. four idle bus states, t i , are inserted by the intel386 sx micro- processor between the two interrupt acknowledge cycles for compatibility with spec trhrl of the 8259a interrupt controller. during both interrupt acknowledge cycles, d 15 d 0 float. no data is read at the end of the first interrupt acknowledge cycle. at the end of the second inter- rupt acknowledge cycle, the intel386 sx microproc- essor will read an external interrupt vector from d 7 d 0 of the data bus. the vector indicates the specific interrupt number (from 0 255) requiring service. 240187 28 interrupt vector (0 255) is read on d0 d7 at end of second interrupt acknowledge bus cycle. because each interrupt acknowledge bus cycle is followed by idle bus states. asserting na y has no practical effect. choose the approach which is simplest for your system hardware design. figure 5.13. interrupt acknowledge cycles 56
intel386 tm sx microprocessor halt indication cycle the execution unit halts as a result of executing a hlt instruction. signaling its entrance into the halt state, a halt indication cycle is performed. the halt indication cycle is identified by the state of the bus definition signals shown on page 40, bus cycle definition signals , and an address of 2. the halt indication cycle must be acknowledged by ready y asserted. a halted intel386 sx microprocessor re- sumes execution when intr (if interrupts are en- abled), nmi or reset is asserted. 240187 29 figure 5.14. example halt indication cycle from non-pipelined cycle 57
intel386 tm sx microprocessor shutdown indication cycle the intel386 sx microprocessor shuts down as a result of a protection fault while attempting to pro- cess a double fault. signaling its entrance into the shutdown state, a shutdown indication cycle is per- formed. the shutdown indication cycle is identified by the state of the bus definition signals shown in bus cycle definition signals and an address of 0. the shutdown indication cycle must be acknowl- edged by ready y asserted. a shutdown intel386 sx microprocessor resumes execution when nmi or reset is asserted. entering and exiting hold acknowledge the bus hold acknowledge state, t h , is entered in response to the hold input being asserted. in the bus hold acknowledge state, the intel386 sx micro- processor floats all outputs or bidirectional signals, except for hlda. hlda is asserted as long as the intel386 sx microprocessor remains in the bus hold acknowledge state. in the bus hold acknowledge state, all inputs except hold, flt y and reset are ignored. 240187 30 figure 5.15. example shutdown indication cycle from non-pipelined cycle 58
intel386 tm sx microprocessor t h may be entered from a bus idle state as in figure 5.16 or after the acknowledgement of the current physical bus cycle if the lock y signal is not assert- ed, as in figures 5.17 and 5.18. t h is exited in response to the hold input being negated. the following state will be t i as in figure 5.16 if no bus request is pending. the following bus state will be t1 if a bus request is internally pending, as in figures 5.17 and 5.18. t h is exited in response to reset being asserted. if a rising edge occurs on the edge-triggered nmi input while in t h , the event is remembered as a non- maskable interrupt 2 and is serviced when t h is exit- ed unless the intel386 sx microprocessor is reset before t h is exited. reset during hold acknowledge reset being asserted takes priority over hold be- ing asserted. if reset is asserted while hold re- mains asserted, the intel386 sx microprocessor drives its pins to defined states during reset, as in table 5.5 pin state during reset , and performs internal reset activity as usual. if hold remains asserted when reset is inactive, the intel386 sx microprocessor enters the hold ac- knowledge state before performing its first bus cy- cle, provided hold is still asserted when the intel386 sx microprocessor would otherwise per- form its first bus cycle. 240187 31 note: for maximum design flexibility the intel386 tm sx cpu has no internal pullup resistors on its outputs. your design may require an external pullup on ads y and other outputs to keep them negated during float periods. figure 5.16. requesting hold from idle bus 59
intel386 tm sx microprocessor float activating the flt y input floats all intel386 sx bidi- rectional and output signals, including hlda. assert- ing flt y isolates the intel386 sx from the sur- rounding circuitry. as the intel386 sx is packaged in a surface mount pqfp, it cannot be removed from the motherboard when in-circuit emulation (ice) is needed. the flt y input allows the intel386 sx to be electrically isolated from the surrounding circuitry. this allows connection of an emulator to the intel386 sx pqfp without removing it from the pcb. this method of emulation is referred to as on-circuit emulation (once). entering and exiting float flt y is an asynchronous, active-low input. it is rec- ognized on the rising edge of clk2. when recog- nized, it aborts the current bus cycle and floats the outputs of the intel386 sx (figure 5.20). flt y must be held low for a minimum of 16 clk2 cycles. reset should be asserted and held asserted until after flt y is deasserted. this will ensure that the intel386 sx will exit float in a valid state. asserting the flt y input unconditionally aborts the current bus cycle and forces the intel386 sx into the float mode. since activating flt y unconditional- ly forces the intel386 sx into float mode, the intel386 sx is not guaranteed to enter float in a valid state. after deactivating flt y , the intel386 sx is not guaranteed to exit float mode in a valid state. this is not a problem as the flt y pin is meant to be used only during once. after exiting float, the intel386 sx must be reset to return it to a valid state. reset should be asserted before flt y is deasserted. this will ensure that the intel386 sx will exit float in a valid state. flt y has an internal pull-up resistor, and if it is not used it should be unconnected. bus activity during and following reset reset is the highest priority input signal, capable of interrupting any processor activity when it is assert- ed. a bus cycle in progress can be aborted at any stage, or idle states or bus hold acknowledge states discontinued so that the reset state is established. 240187 32 note: hold is a synchronous input and can be asserted at any clk2 edge, provided setup and hold (t 23 and t 24 ) require- ments are met. this waveform is useful for determining hold acknowledge latency. figure 5.17. requesting hold from active bus (na y inactive) 60
intel386 tm sx microprocessor reset should remain asserted for at least 15 clk2 periods to ensure it is recognized throughout the intel386 sx microprocessor, and at least 80 clk2 periods if self-test is going to be requested at the falling edge. reset asserted pulses less than 15 clk2 periods may not be recognized. reset puls- es less than 80 clk2 periods followed by a self-test may cause the self-test to report a failure when no true failure exists. provided the reset falling edge meets setup and hold times t 25 and t 26 , the internal processor clock phase is defined at that time as illustrated by figure 5.19 and figure 7.7. a self-test may be requested at the time reset goes inactive by having the busy y input at a low level as shown in figure 5.19. the self-test requires approximately (2 20 a 60) clk2 periods to com- plete. the self-test duration is not affected by the test results. even if the self-test indicates a problem, the intel386 sx microprocessor attempts to proceed with the reset sequence afterwards. after the reset falling edge (and after the self-test if it was requested) the intel386 sx microprocessor performs an internal initialization sequence for ap- proximately 350 to 450 clk2 periods. 240187 33 note: hold is a synchronous input and can be asserted at any clk2 edge, provided setup and hold (t23 and t24) require- ments are met. this waveform is useful for determining hold acknowledge latency. figure 5.18. requesting hold from idle bus (na y active) 61
intel386 tm sx microprocessor 240187 34 notes: 1. busy y should be held stable for 8 clk2 periods before and after the clk2 period in which reset falling edge occurs. 2. if self-test is requested the outputs remain in their reset state as shown here. figure 5.19. bus activity from reset until first code fetch 240187 51 figure 5.20. entering and exiting, flt y 62
intel386 tm sx microprocessor 5.5 self-test signature upon completion of self-test (if self-test was re- quested by driving busy y low at the falling edge of reset) the eax register will contain a signature of 00000000h indicating the intel386 sx microproc- essor passed its self-test of microcode and major pla contents with no problems detected. the pass- ing signature in eax, 00000000h, applies to all revi- sion levels. any non-zero signature indicates the unit is faulty. 5.6 component and revision identifiers to assist users, the intel386 sx microprocessor af- ter reset holds a component identifier and revision identifier in its dx register. the upper 8 bits of dx hold 23h as identification of the intel386 sx micro- processor (the lower nibble, 03h, refers to the intel386 dx architecture. the upper nibble, 02h, re- fers to the second member of the intel386 dx fami- ly). the lower 8 bits of dx hold an 8-bit unsigned binary number related to the component revision level. the revision identifier will, in general, chrono- logically track those component steppings which are intended to have certain improvements or distinction from previous steppings. the intel386 sx microproc- essor revision identifier will track that of the intel386 dx cpu where possible. the revision identifier is intended to assist users to a practical extent. however, the revision identifier val- ue is not guaranteed to change with every stepping revision, or to follow a completely uniform numerical sequence, depending on the type or intention of re- vision, or manufacturing materials required to be changed. intel has sole discretion over these char- acteristics of the component. table 5.7. component and revision identifier history stepping revision identifier a0 04h b 05h c 08h d 08h e 08h 5.7 coprocessor interfacing the intel386 sx microprocessor provides an auto- matic interface for the intel intel387 sx numeric floating-point coprocessor. the intel387 sx coproc- essor uses an i/o mapped interface driven automat- ically by the intel386 sx microprocessor and assist- ed by three dedicated signals: busy y , error y and pereq. as the intel386 sx microprocessor begins support- ing a coprocessor instruction, it tests the busy y and error y signals to determine if the coproces- sor can accept its next instruction. thus, the busy y and error y inputs eliminate the need for any `preamble' bus cycles for communication be- tween processor and coprocessor. the intel387 sx can be given its command opcode immediately. the dedicated signals provide instruction synchroniza- tion, and eliminate the need of using the wait op- code (9bh) for intel387 sx instruction synchroniza- tion (the wait opcode was required when the 8086 or 8088 was used with the 8087 coprocessor). custom coprocessors can be included in intel386 sx microprocessor based systems by memory- mapped or i/o-mapped interfaces. such coproces- sor interfaces allow a completely custom protocol, and are not limited to a set of coprocessor protocol `primitives'. instead, memory-mapped or i/o- mapped interfaces may use all applicable instruc- tions for high-speed coprocessor communication. the busy y and error y inputs of the intel386 sx microprocessor may also be used for the custom coprocessor interface, if such hardware assist is de- sired. these signals can be tested by the wait op- code (9bh). the wait instruction will wait until the busy y input is inactive (interruptable by an nmi or enabled intr input), but generates an exception 16 fault if the error y pin is active when the busy y goes (or is) inactive. if the custom coprocessor inter- face is memory-mapped, protection of the address- es used for the interface can be provided with the intel386 sx cpu's on-chip paging or segmentation mechanisms. if the custom interface is i/o-mapped, protection of the interface can be provided with the iopl (i/o privilege level) mechanism. the intel387 sx numeric coprocessor interface is i/o mapped as shown in table 5.8. note that the intel387 sx coprocessor interface addresses are beyond the 0h-0ffffh range for programmed i/o. when the intel386 sx microprocessor supports the intel387 sx coprocessor, the intel386 sx micro- processor automatically generates bus cycles to the coprocessor interface addresses. table 5.8. numeric coprocessor port addresses address in intel386 sx intel387 sx cpu i/o space coprocessor register 8000f8h opcode register 8000fch/8000feh * operand register * generated as 2nd bus cycle during dword transfer. to correctly map the intel387 sx registers to the appropriate i/o addresses, connect the cmd0 and cmd1 lines of the intel387 sx as listed in table 5.9. table 5.9. connections for cmd0 and cmd1 inputs for the intel387 sx signal connection cmd0 connect directly to intel386 sx cpu a2 signal cmd1 connect to ground. 63
intel386 tm sx microprocessor software testing for coprocessor presence when software is used to test for coprocessor (intel387 sx) presence, it should use only the follow- ing coprocessor opcodes: finit, fninit, fstcw mem, fstsw mem and fstsw ax. to use other coprocessor opcodes when a coprocessor is known to be not present, first set em e 1 in the intel386 sx cpu's cr0 register. 6.0 package thermal specifications the intel386 sx microprocessor is specified for op- eration when case temperature (t c ) is within the range of 0 c 100 c. the case temperature may be measured in any environment, to determine whether the intel386 sx microprocessor is within specified operating range. the case temperature should be measured at the center of the top surface opposite the pins. the ambient temperature (t a ) is related to t c and the thermal conductivity parameters i ja and i jc from the following equations (eqn. 3 is derived by elimi- nating the junction temperature (t j ) between eqns. 1 and 2): 1) t j e t c a p * i jc 2) t a e t j b p * i ja 3) t c e t a a p * [ i ja b i jc ] values for i ja and i jc are given in table 6.1 for the 100 lead fine pitch. i ja is given at various airflows. the power (p) dissipated by the chip as heat is vcc * icc. a guaranteed maximum safe t a can be cal- culated from eqn. 3 by using the maximum safe t c of 100 c, along with the maximum power drawn by the chip in the given design, and i jc and i ja values from table 6.1. (the i ja value depends on the airflow, measured at the top of the chip, provided by the system ventilation.) 7.0 electrical specifications the following sections describe recommended elec- trical connections for the intel386 sx microproces- sor, and its electrical specifications. 7.1 power and grounding the intel386 sx microprocessor is implemented in chmos iv technology and has modest power re- quirements. however, its high clock frequency and 47 output buffers (address, data, control, and hlda) can cause power surges as multiple output buffers drive new signal levels simultaneously. for clean on- chip power distribution at high frequency, 14 vcc and 18 vss pins separately feed functional units of the intel386 sx microprocessor. power and ground connections must be made to all external vcc and vss pins of the intel386 sx micro- processor. on the circuit board, all vcc pins should be connected on a vcc plane and all vss pins should be connected on a gnd plane. power decoupling recommendations liberal decoupling capacitors should be placed near the intel386 sx microprocessor. the intel386 sx mi- croprocessor driving its 24-bit address bus and 16-bit data bus at high frequencies can cause tran- sient power surges, particularly when driving large capacitive loads. low inductance capacitors and in- terconnects are recommended for best high fre- quency electrical performance. inductance can be reduced by shortening circuit board traces between the intel386 sx microprocessor and decoupling ca- pacitors as much as possible. table 6.1. thermal resistances ( c/watt) i jc and i ja . i ja versus airflow - ft/min (m/sec) package i jc 0 200 400 600 800 1000 (0) (1.01) (2.03) (3.04) (4.06) (5.07) 100 lead 7.5 34.5 29.5 25.5 22.5 21.5 21 fine pitch 64
intel386 tm sx microprocessor table 7.1. recommended resistor pull-ups to vcc pin signal pull-up value purpose 16 ads y 20 k x g 10% lightly pull ads y inactive during intel386 tm sx cpu hold acknowledge states 26 lock y 20 k x g 10% lightly pull lock y inactive during intel386 tm sx cpu hold acknowledge states resistor recommendations the error y , flt y and busy y inputs have inter- nal pull-up resistors of approximately 20 k x and the pereq input has an internal pull-down resistor of approximately 20 k x built into the intel386 sx mi- croprocessor to keep these signals inactive when the intel387 sx is not present in the system (or tem- porarily removed from its socket). in typical designs, the external pull-up resistors shown in table 7.1 are recommended. however, a particular design may have reason to adjust the re- sistor values recommended here, or alter the use of pull-up resistors in other ways. other connection recommendations for reliable operation, always connect unused in- puts to an appropriate signal level. n/c pins should always remain unconnected. connection of n/c pins to vcc or vss will result in component mal- function or incompatibility with future steppings of the intel386 sx microprocessor . particularly when not using interrupts or bus hold (as when first prototyping), prevent any chance of spuri- ous activity by connecting these associated inputs to gnd: pin signal 40 intr 38 nmi 4 hold if not using address pipelining, connect pin 6, na y , through a pull-up in the range of 20 k x to vcc. 7.2 maximum ratings table 7.2. maximum ratings parameter maximum rating storage temperature b 65 cto150 c case temperature under bias b 65 cto110 c supply voltage with respect to vss b .5v to 6.5v voltage on other pins b .5v to (vcc a .5)v table 7.2 gives stress ratings only, and functional operation at the maximums is not guaranteed. func- tional operating conditions are given in section 7.3, d.c. specifications , and section 7.4, a.c. specifi- cations . extended exposure to the maximum ratings may af- fect device reliability. furthermore, although the intel386 sx microprocessor contains protective cir- cuitry to resist damage from static electric discharge, always take precautions to avoid high static voltages or electric fields. 65
intel386 tm sx microprocessor 7.3 d.c. specifications functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.3. intel386 tm sx microprocessor d.c. characteristicse33 mhz, 25 mhz, 20 mhz and 16 mhz symbol parameter min max unit test condition v il input low voltage b 0.3 a 0.8 v v ih input high voltage 2.0 v cc a 0.3 v v ilc clk2 input low voltage b 0.3 a 0.8 v v ihc clk2 input high voltage v cc b 0.8 v cc a 0.3 v v ol output low voltage i ol e 4 ma: a 23 a 1 ,d 15 d 0 0.45 v i ol e 5 ma: bhe y ,ble y ,w/r y ,d/c y , 0.45 v m/io y ,lock y ,ads y ,hlda v oh output high voltage i oh eb 1 ma: a 23 a 1 ,d 15 d 0 2.4 v i oh eb 0.2 ma: a 23 a 1 ,d 15 d 0 v cc b 0.5 v i oh eb 0.9 ma: bhe y ,ble y ,w/r y , 2.4 v d/c y ,m/io y ,lock y , ads y ,hlda i oh eb 0.18 ma: bhe y ,ble y ,w/r y ,v cc b 0.5 v d/c y ,m/io y ,lock y , ads y ,hlda i li input leakage current g 15 m a0v s v in s v cc (for all pins except pereq, busy y , flt y and error y ) i ih input leakage current 200 m av ih e 2.4v, note 1 (pereq pin) i il input leakage current b 400 m av il e 0.45v, note 2 (busy y , error y and flt y pins) i lo output leakage current g 15 m a 0.45v s v out s v cc i cc supply current (see note 3) clk2 e 32 mhz: with 16 mhz intel386 sx cpu 220 ma i cc typ e 150 ma clk2 e 40 mhz: with 20 mhz intel386 sx cpu 250 ma i cc typ e 180 ma clk2 e 50 mhz: with 25 mhz intel386 sx cpu 280 ma i cc typ e 210 ma clk2 e 66 mhz: with 33 mhz intel386 sx cpu 380 ma i cc typ e 290 ma c in input capacitance 10 pf f c e 1 mhz, note 4 c out output or i/o capacitance 12 pf f c e 1 mhz, note 4 c clk clk2 capacitance 20 pf f c e 1 mhz, note 4 all values except i cc tested at the minimum operating frequency of the part (clk2 e 8 mhz). notes: 1. pereq input has an internal pull-down resistor. 2. busy y , flt y and error y inputs each have an internal pull-up resistor. 3. i cc max measurement at worst case frequency, v cc and temperature, with 50 pf output load. 4. not 100% tested. 66
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.4. low power (lp) intel386 tm sx microprocessor d.c. characteristicse33 mhz, 25 mhz, 20 mhz, 16 mhz, and 12 mhz symbol parameter min max unit test condition v il input low voltage b 0.3 a 0.8 v v ih input high voltage 2.0 v cc a 0.3 v v ilc clk2 input low voltage b 0.3 a 0.8 v v ihc clk2 input high voltage v cc b 0.8 v cc a 0.3 v v ol output low voltage i ol e 4 ma: a 23 a 1 ,d 15 d 0 0.45 v i ol e 5 ma: bhe y ,ble y ,w/r y ,d/c y , 0.45 v m/io y ,lock y ,ads y ,hlda v oh output high voltage i oh eb 1 ma: a 23 a 1 ,d 15 d 0 2.4 v i oh eb 0.2 ma: a 23 a 1 ,d 15 d 0 v cc b 0.5 v i oh eb 0.9 ma: bhe y ,ble y ,w/r y , 2.4 v d/c y ,m/io y ,lock y , ads y ,hlda i oh eb 0.18 ma: bhe y ,ble y ,w/r y ,v cc b 0.5 v d/c y ,m/io y ,lock y , ads y ,hlda i li input leakage current g 15 m a0v s v in s v cc (for all pins except pereq, busy y , flt y and error y ) i ih input leakage current 200 m av ih e 2.4v, note 1 (pereq pin) i il input leakage current b 400 m av il e 0.45v, note 2 (busy y , error y and flt y pins) i lo output leakage current g 15 m a 0.45v s v out s v cc i cc supply current (see note 3) clk2 e 4 mhz 100 ma i cc typ e 50 ma clk2 e 24 mhz: with 12 mhz intel386 sx cpu 190 ma i cc typ e 120 ma clk2 e 32 mhz: with 16 mhz intel386 sx cpu 220 ma i cc typ e 150 ma clk2 e 40 mhz: with 20 mhz intel386 sx cpu 250 ma i cc typ e 180 ma clk2 e 50 mhz: with 25 mhz intel386 sx cpu 280 ma i cc typ e 210 ma clk2 e 66 mhz: with 33 mhz intel386 sx cpu 380 ma i cc typ e 290 ma c in input capacitance 10 pf f c e 1 mhz, note 4 c out output or i/o capacitance 12 pf f c e 1 mhz, note 4 c clk clk2 capacitance 20 pf f c e 1 mhz, note 4 all values except i cc tested at the minimum operating frequency of the part (clk2 e 4 mhz). notes: 1. pereq input has an internal pull-down resistor. 2. busy y , flt y and error y inputs each have an internal pull-up resistor. 3. i cc max measurement at worst case frequency, v cc and temperature, with 50 pf output load. 4. not 100% tested. 67
intel386 tm sx microprocessor 7.4 a.c. specifications the a.c. specifications given in tables 7.5 through 7.8 consist of output delays, input setup require- ments and input hold requirements. all a.c. specifi- cations are relative to the clk2 rising edge crossing the 2.0v level. a.c. spec measurement is defined by figure 7.1. in- puts must be driven to the voltage levels indicated by figure 7.1 when a.c. specifications are mea- sured. output delays are specified with minimum and maximum limits measured as shown. the mini- mum delay times are hold times provided to external circuitry. input setup and hold times are specified as minimums, defining the smallest acceptable sam- pling window. within the sampling window, a syn- chronous input signal must be stable for correct op- eration. outputs ads y , w/r y , d/c y , m/io y , lock y , bhe y , ble y ,a 23 a 1 and hlda only change at the beginning of phase one. d 15 d 0 (write cycles) only change at the beginning of phase two. the ready y , hold, busy y , error y , pereq, flt y and d 15 d 0 (read cycles) inputs are sampled at the beginning of phase one. the na y , intr and nmi inputs are sampled at the beginning of phase two. 240187 35 legend a e maximum output delay spec b e minimum output delay spec c e minimum input setup spec d e minimum input hold spec figure 7.1. drive levels and measurement points for a.c. specifications 68
intel386 tm sx microprocessor a.c. specifications functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.5. intel386 tm sx microprocessor a.c. characteristicse33 mhz and 25 mhz symbol parameter 33 mhz 25 mhz unit figure notes intel386 sx intel386 sx min max min max operating frequency 4 33 4 25 mhz half clk2 frequency t 1 clk2 period 15 125 20 125 ns 7.3 t 2a clk2 high time 6.25 7 ns 7.3 at 2v (3) t 2b clk2 high time 4.0 4 ns 7.3 at (v cc b 0.8)v (3) ; note 3 t 3a clk2 low time 6.25 7 ns 7.3 at 2v (3) t 3b clk2 low time 4.5 5 ns 7.3 at 0.8v (3) t 4 clk2 fall time 4 7 ns 7.3 (v cc b 0.8)v to 0.8v (3) t 5 clk2 rise time 4 7 ns 7.3 0.8v to (v cc b 0.8)v (3) t 6 a 23 a 1 valid delay 4 15 4 17 ns 7.5 c l e 50 pf (4) t 7 a 23 a 1 float delay 4 20 4 30 ns 7.6 (note 1) t 8 bhe y , ble y , lock y 4 15 4 17 ns 7.5 c l e 50 pf (4) valid delay t 9 bhe y , ble y , lock y 4 20 4 30 ns 7.6 (note 1) float delay t 10 w/r y , m/io y , d/c y , 4 15 4 17 ns 7.5 c l e 50 pf (4) ads y valid delay t 11 w/r y , m/io y , d/c y , 4 20 4 30 ns 7.6 (note 1) ads y float delay t 12 d 15 d 0 write data 7 23 7 23 ns 7.5 c l e 50 pf (4, 5) valid delay t 12a d 15 d 0 write data 2 2 ns c l e 50 pf (4) hold time t 13 d 15 d 0 write data 4 17 4 22 ns 7.6 (note 1) float delay t 14 hlda valid delay 4 20 4 22 ns 7.6 c l e 75 pf (4) t 15 na y setup time 5 5 ns 7.4 t 16 na y hold time 2 3 ns 7.4 t 19 ready y setup time 7 9 ns 7.4 t 20 ready y hold time 4 4 ns 7.4 t 21 d 15 d 0 read data 5 7 ns 7.4 setup time t 22 d 15 d 0 read data 3 5 ns 7.4 hold time 69
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.5. intel386 tm sx microprocessor a.c. characteristicse33 mhz and 25 mhz (continued) symbol parameter 33 mhz 25 mhz unit figure notes intel386 sx intel386 sx min max min max t 23 hold setup time 9 9 ns 7.4 t 24 hold hold time 2 3 ns 7.4 t 25 reset setup time 5 8 ns 7.7 t 26 reset hold time 2 3 ns 7.7 t 27 nmi, intr setup time 5 6 ns 7.4 (note 2) t 28 nmi, intr hold time 5 6 ns 7.4 (note 2) t 29 pereq, error y , busy y , 5 6 ns 7.4 (note 2) flt y setup time t 30 pereq, error y , busy y , 4 5 ns 7.4 (note 2) flt y hold time notes: 1. float condition occurs when maximum output current becomes less than i lo in magnitude. float delay is not 100% tested. 2. these inputs are allowed to be asynchronous to clk2. the setup and hold specifications are given for testing purposes to assure recognition within a specific clk2 period. 3. these are not tested. they are guaranteed by design characterization. 4. tested with cl set at 50 pf. see figures 7 and 8 for load capacitance derating curve. 5. minimum time not 100% tested. table 7.6. low power (lp) intel386 tm sx microprocessor a.c. characteristicse33 mhz and 25 mhz symbol parameter 33 mhz 25 mhz unit figure notes intel386 sx intel386 sx min max min max operating frequency 2 33 2 25 mhz half clk2 frequency t 1 clk2 period 15 250 20 250 ns 7.3 t 2a clk2 high time 6.25 7 ns 7.3 at 2v (3) t 2b clk2 high time 4.0 4 ns 7.3 at (v cc b 0.8)v (3) ; note 3 t 3a clk2 low time 6.25 7 ns 7.3 at 2v (3) t 3b clk2 low time 4.5 5 ns 7.3 at 0.8v (3) t 4 clk2 fall time 4 7 ns 7.3 (v cc b 0.8)v to 0.8v (3) t 5 clk2 rise time 4 7 ns 7.3 0.8v to (v cc b 0.8)v (3) t 6 a 23 a 1 valid delay 4 15 4 17 ns 7.5 c l e 50 pf (4) t 7 a 23 a 1 float delay 4 20 4 30 ns 7.6 (note 1) t 8 bhe y , ble y , lock y 4 15 4 17 ns 7.5 c l e 50 pf (4) valid delay t 9 bhe y , ble y , lock y 4 20 4 30 ns 7.6 (note 1) float delay 70
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.6. low power (lp) intel386 tm sx microprocessor a.c. characteristicse33 mhz and 25 mhz (continued) symbol parameter 33 mhz 25 mhz unit figure notes intel386 sx intel386 sx min max min max t 10 w/r y , m/io y , d/c y , 4 15 4 17 ns 7.5 c l e 50 pf (4) ads y valid delay t 11 w/r y , m/io y , d/c y , 4 20 4 30 ns 7.6 (note 1) ads y float delay t 12 d 15 d 0 write data 7 23 7 23 ns 7.5 c l e 50 pf (4, 5) valid delay t 12a d 15 d 0 write data 2 2 ns c l e 50 pf (4) hold time t 13 d 15 d 0 write data 4 17 4 22 ns 7.6 (note 1) float delay t 14 hlda valid delay 4 20 4 22 ns 7.6 c l e 50 pf (4) t 15 na y setup time 5 5 ns 7.4 t 16 na y hold time 2 3 ns 7.4 t 19 ready y setup time 7 9 ns 7.4 t 20 ready y hold time 4 4 ns 7.4 t 21 d 15 d 0 read data 5 7 ns 7.4 setup time t 22 d 15 d 0 read data 3 5 ns 7.4 hold time t 23 hold setup time 9 9 ns 7.4 t 24 hold hold time 2 3 ns 7.4 t 25 reset setup time 5 8 ns 7.7 t 26 reset hold time 2 3 ns 7.7 t 27 nmi, intr setup time 5 6 ns 7.4 (note 2) t 28 nmi, intr hold time 5 6 ns 7.4 (note 2) t 29 pereq, error y , busy y , 5 6 ns 7.4 (note 2) flt y setup time t 30 pereq, error y , busy y , 4 5 ns 7.4 (note 2) flt y hold time notes: 1. float condition occurs when maximum output current becomes less than i lo in magnitude. float delay is not 100% tested. 2. these inputs are allowed to be asynchronous to clk2. the setup and hold specifications are given for testing purposes to assure recognition within a specific clk2 period. 3. these are not tested. they are guaranteed by design characterization. 4. tested with cl set at 50 pf. see figures 7 and 8 for load capacitance derating curve. 5. minimum time not 100% tested. 71
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.7. intel386 tm sx a.c. characteristicse20 mhz and 16 mhz symbol parameter 20 mhz 16 mhz unit figure notes intel386 sx intel386 sx min max min max operating frequency 4 20 4 16 mhz half clk2 frequency t 1 clk2 period 25 125 31 125 ns 7.3 t 2a clk2 high time 8 9 ns 7.3 at 2v (3) t 2b clk2 high time 5 5 ns 7.3 at (v cc b 0.8)v (3) t 3a clk2 low time 8 9 ns 7.3 at 2v (3) t 3b clk2 low time 6 7 ns 7.3 at 0.8v (3) t 4 clk2 fall time 8 8 ns 7.3 (v cc b 0.8)v to 0.8v (3) t 5 clk2 rise time 8 8 ns 7.3 0.8v to (v cc b 0.8)v (3) t 6 a 23 a 1 valid delay 4 30 4 36 ns 7.5 c l e 120 pf (4) t 7 a 23 a 1 float delay 4 32 4 40 ns 7.6 (note 1) t 8 bhe y , ble y , lock y 4 30 4 36 ns 7.5 c l e 75 pf (4) valid delay t 9 bhe y , ble y , lock y 4 32 4 40 ns 7.6 (note 1) float delay t 10a m/io y d/c y valid delay 6 28 6 33 ns 7.5 c l e 75 pf (4) t 10b w/r y , ads y valid delay 26 t 11 w/r y , m/io y , d/c y , 6 30 6 35 ns 7.6 (note 1) ads y float delay t 12 d 15 d 0 write data 4 38 4 40 ns 7.5 c l e 120 pf (4) valid delay t 13 d 15 d 0 write data 4 27 4 35 ns 7.6 (note 1) float delay t 14 hlda valid delay 4 28 4 33 ns 7.5 c l e 75 pf (4) t 15 na y setup time 5 5 ns 7.4 t 16 na y hold time 12 21 ns 7.4 t 19 ready y setup time 12 19 ns 7.4 t 20 ready y hold time 4 4 ns 7.4 t 21 d 15 d 0 read data 9 9 ns 7.4 setup time t 22 d 15 d 0 read data 6 6 ns 7.4 hold time t 23 hold setup time 17 26 ns 7.4 t 24 hold hold time 5 5 ns 7.4 t 25 reset setup time 12 13 ns 7.7 t 26 reset hold time 4 4 ns 7.7 72
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.7. intel386 tm sx a.c. characteristicse20 mhz and 16 mhz (continued) symbol parameter 20 mhz 16 mhz unit figure notes intel386 sx intel386 sx min max min max t 27 nmi, intr setup time 16 16 ns 7.4 (note 2) t 28 nmi, intr hold time 16 16 ns 7.4 (note 2) t 29 pereq, error y , busy y , 14 16 ns 7.4 (note 2) flt y setup time t 30 pereq, error y , busy y , 5 5 ns 7.4 (note 2) flt y hold time table 7.8. low power (lp) intel386 tm sx a.c. characteristicse20 mhz, 16 mhz and 12 mhz symbol parameter 20 mhz 16 mhz 12 mhz unit figure notes intel386 sx intel386 sx intel386 sx min max min max min max operating frequency 2 20 2 16 2 12.5 mhz half clk2 frequency t 1 clk2 period 25 250 31 250 40 250 ns 7.3 t 2a clk2 high time 8 9 11 ns 7.3 at 2v (note 3) t 2b clk2 high time 5 5 7 ns 7.3 at (v cc b 0.8v) (3) t 3a clk2 low time 8 9 11 ns 7.3 at 2v (3) t 3b clk2 low time 6 7 9 ns 7.3 at 0.8v (3) t 4 clk2 fall time 8 8 8 ns 7.3 (v cc b 0.8v) to 0.8v (3) t 5 clk2 rise time 8 8 8 ns 7.3 0.8v to (v cc b 0.8v) (3) t 6 a 23 a 1 valid delay 4 30 4 36 4 42 ns 7.5 c l e 120 pf (4) t 7 a 23 a 1 float delay 4 32 4 40 4 45 ns 7.6 (note 1) t 8 bhe y , ble y , lock y 4 30 4 36 4 36 ns 7.5 c l e 75 pf valid delay t 9 bhe y , ble y , lock y 4 32 4 40 4 40 ns 7.6 (note 1) float delay t 10 m/io y , d/c y , w/r y , 6 28 6 33 4 33 ns 7.5 c l e 75 pf ads y valid delay t 11 m/io y , d/c y , w/r y , 6 30 6 35 4 35 ns 7.6 (note 1) ads y float delay t 12 d15 d0 write 4 38 4 40 4 50 ns 7.5 c l e 120 pf (4) data valid delay t 13 d15 d0 write 4 27 4 35 4 40 ns 7.6 (note 1) data float delay t 14 hlda valid delay 4 28 6 33 4 33 ns 7.5 c l e 75 pf (4) t 15 na y setup time 5 5 7 ns 7.4 t 16 na y hold time 12 21 21 ns 7.4 73
intel386 tm sx microprocessor functional operating range: v cc e 5v g 10%; t case e 0 c to 100 c table 7.8. low power (lp) intel386 tm sx a.c. characteristicse20 mhz, 16 mhz and 12 mhz (continued) symbol parameter 20 mhz 16 mhz 12 mhz unit figure notes intel386 sx intel386 sx intel386 sx min max min max min max t 19 ready y setup time 12 19 19 ns 7.4 t 20 ready y hold time 4 4 4 ns 7.4 t 21 d15 d0 read data 9 9 9 ns 7.4 setup time t 22 d15 d0 read data 6 6 6 ns 7.4 hold time t 23 hold setup time 17 26 26 ns 7.4 t 24 hold hold time 5 5 7 ns 7.4 t 25 reset setup time 12 13 15 ns 7.7 t 26 reset hold time 4 4 6 ns 7.7 t 27 nmi, intr setup time 16 16 16 ns 7.4 (note 2) t 28 nmi, intr hold time 16 16 16 ns 7.4 (note 2) t 29 pereq, error y , busy y , 14 16 16 ns 7.4 (note 2) flt y setup time t 30 pereq, error y , busy y , 5 5 5 ns 7.4 (note 2) flt y hold time notes: 1. float condition occurs when maximum output current becomes less than i lo in magnitude. float delay is not 100% tested. 2: these inputs are allowed to be asynchronous to clk2. the setup and hold specifications are given for testing purposes, to assure recognition within a specific clk2 period. 3: these are not tested. they are guaranteed by design characterization. 4: tested with c l set at 50 pf and derated to support the indicated distributed capacitive load. see figures 7.8 though 7.10 for the capacitive derating curve. a.c. test loads 240187 36 a.c. timing waveforms 240187 37 figure 7.2. a.c. test loads figure 7.3. clk2 waveform 74
intel386 tm sx microprocessor 240187 38 figure 7.4. a.c. timing waveformseinput setup and hold timing 240187 39 figure 7.5. a.c. timing waveformseoutput valid delay timing 75
intel386 tm sx microprocessor 240187 40 figure 7.6. a.c. timing waveformseoutput float delay and hlda valid delay timing 240187 41 figure 7.7. a.c. timing waveformsereset setup and hold timing and internal phase 76
intel386 tm sx microprocessor 240187 42 figure 7.8. typical output valid delay versus load capacitance at maximum operating temperature (c l e 120 pf) 240187 43 figure 7.9. typical output valid delay versus load capacitance at maximum operating temperature (c l e 75 pf) 240187 50 figure 7.10. typical output rise time versus load capacitance at maximum operating temperature 240187 45 figure 7.11. typical i cc vs frequency 77
intel386 tm sx microprocessor 240187 48 figure 7.12. preliminary ice tm -intel386 tm sx emulator user cable with pqfp adapter 240187 49 figure 7.13. preliminary ice tm -intel386 tm sx emulator user cable with oib and pqfp adapter 7.5 designing for the ice tm -intel386 tm sx emulator ice-intel386 sx is the in-circuit emulator for the in- tel386 tm sx cpu. the ice-386 sx emulator pro- vides a 100-pin fine pitch flat-pack probe for connec- tion to a socket located on the target system. sockets that accept this probe are available from 3m (part y 2-0100-07243-000) or from amp (part y 821959-1 and part y 821949-4). the ice-386 sx emulator probe attaches to the target system via an adapter that replaces the intel386 sx component in the target system. 78
intel386 tm sx microprocessor due to the high operating frequency of intel386 sx cpu based systems, there is no buffering between the intel386 sx emulation processor (on the emula- tor probe) and the target system. a direct result of the non-buffered interconnect is that the ice- intel386 sx emulator shares the address and data busses with the target system. in order to avoid problems with the shared bus and maintain signal integrity, the system designer must adhere to the following guidelines: 1. the bus controller must only enable data trans- ceivers onto the data bus during valid read cycles (initiated by assertion of ads y ) of the intel386 sx cpu, other local devices or other bus mas- ters. 2. before another bus master drives the local proc- essor address bus, the other master must gain control of the address bus by asserting hold and receiving the hlda response. 3. the emulation processor receives the reset signal 2 or 4 clk2 cycles later than an intel386 sx cpu would, and responds to reset later. correct phase of the response is guaranteed. in order to avoid problems that might arise due to the shared busses, an optional use isolation board (oib) is included with the emulator hardware. the oib may be used to provide buffering between the emulation processor and the target system, but in- serts a delay of approximately 10 ns in signal path. in addition to the above considerations, the ice-386 sx emulator processor module has several electrical and mechanical characteristics that should be taken into consideration when designing the intel386 sx cpu system. capacitive loading: ice-intel386 sx adds up to 27 pf to each intel386 sx cpu signal. drive requirements: ice-intel386 sx adds one fast ttl load on the clk2, control, address, and data lines. these loads are within the processor module and are driven by the intel386 sx cpu emu- lation processor, which has standard drive and load- ing capability listed in tables 7.3 and 7.4. power requirements: for noise immunity and cmos latch-up protection the ice-intel386 sx emu- lator processor module is powered by the user sys- tem. the circuitry on the processor module draws up to 1.4a including the maximum intel386 sx cpu i cc from the user intel386 sx cpu socket. intel386 sx cpu location and orientation: the ice-intel386 sx emulator processor module may re- quire lateral clearance. figure 7.12 shows the clear- ance requirements of the imp adapter. the optional isolation board (oib), which provides extra electrical buffering and has the same lateral clearance re- quirements as figure 7.12, adds an additional 0.5 inches to the vertical clearance requirement. this is illustrated in figure 7.13. optional isolation board (oib) and the clk2 speed reduction: due to the unbuffered probe de- sign, the ice-intel386 sx emulator is susceptible to errors on the user's bus. the oib allows the ice- intel386 sx emulator to function in user systems with faults (shorted signals, etc.). after electrical ver- ification the oib may be removed. when the oib is installed, the user system must have a maximum clk2 frequency of 20 mhz. 8.0 differences between the intel386 tm sx cpu and the intel386 tm dx cpu the following are the major differences between the intel386 sx cpu and the intel386 dx cpu: 1. the intel386 sx cpu generates byte selects on bhe y and ble y (like the 8086 and 80286) to distinguish the upper and lower bytes on its 16-bit data bus. the intel386 dx cpu uses four byte selects, be0 y -be3 y , to distinguish between the different bytes on its 32-bit bus. 2. the intel386 sx cpu has no bus sizing option. the intel386 dx cpu can select between either a 32-bit bus or a 16-bit bus by use of the bs16 y input. the intel386 sx cpu has a 16-bit bus size. 3. the na y pin operation in the intel386 sx cpu is identical to that of the na y pin on the intel386 dx cpu with one exception: the intel386 dx cpu na y pin cannot be activated on 16-bit bus cy- cles (where bs16 y is low in the intel386 dx cpu case), whereas na y can be activated on any intel386 sx cpu bus cycle. 4. the contents of all intel386 sx cpu registers at reset are identical to the contents of the intel386 dx cpu registers at reset, except the dx regis- ter. the dx register contains a component-step- ping identifier at reset, i.e. in intel386 dx cpu, dh e 3 indicates intel386 dx cpu after reset dl e revision number; in intel386 sx cpu, dh e 23h indicates intel386 sx cpu after reset dl e revision number. 79
intel386 tm sx microprocessor 5. the intel386 dx cpu uses a 31 and m/io y as selects for the numerics coprocessor. the intel386 sx cpu uses a 23 and m/io y as selects. 6. the intel386 dx cpu prefetch unit fetches code in four-byte units. the intel386 sx cpu prefetch unit reads two bytes as one unit (like the 80286). in bs16 mode, the intel386 dx cpu takes two consecutive bus cycles to complete a prefetch re- quest. if there is a data read or write request after the prefetch starts, the intel386 dx cpu will fetch all four bytes before addressing the new request. 7. both intel386 dx cpu and intel386 sx cpu have the same logical address space. the only differ- ence is that the intel386 dx cpu has a 32-bit physical address space and the intel386 sx cpu has a 24-bit physical address space. the intel386 sx cpu has a physical memory address space of up to 16 megabytes instead of the 4 gigabytes available to the intel386 dx cpu. therefore, in intel386 sx cpu systems, the operating system must be aware of this physical memory limit and should allocate memory for applications programs within this limit. if a intel386 dx cpu system uses only the lower 16 megabytes of physical address, then there will be no extra effort required to mi- grate intel386 dx cpu software to the intel386 sx cpu. any application which uses more than 16 megabytes of memory can run on the intel386 sx cpu if the operating system utilizes the intel386 sx cpu's paging mechanism. in spite of this difference in physical address space, the intel386 sx cpu and intel386 dx cpu can run the same operating systems and applications within their respective physical memory con- straints. 8. the intel386 sx has an input called flt y which tri-states all bidirectional and output pins, includ- ing hlda y , when asserted. it is used with on circuit emulation (once). in the intel386 dx cpu, flt y is found only on the plastic quad flat package version and not on the ceramic pin grid array version. for a more detailed explanation of flt y and testability, please refer to section 5.4. 9.0 instruction set this section describes the instruction set. table 9.1 lists all instructions along with instruction encoding diagrams and clock counts. further details of the instruction encoding are then provided in the follow- ing sections, which completely describe the encod- ing structure and the definition of all fields occurring within instructions. 9.1 intel386 tm sx cpu instruction encoding and clock count summary to calculate elapsed time for an instruction, multiply the instruction clock count, as listed in table 9.1 be- low, by the processor clock period (e.g. 62.5 ns for an intel386 sx microprocessor operating at 16 mhz). the actual clock count of an intel386 sx microprocessor program will average 5% more than the calculated clock count due to instruction se- quences which execute faster than they can be fetched from memory. instruction clock count assumptions 1. the instruction has been prefetched, decoded, and is ready for execution. 2. bus cycles do not require wait states. 3. there are no local bus hold requests delaying processor access to the bus. 4. no exceptions are detected during instruction ex- ecution. 5. if an effective address is calculated, it does not use two general register components. one regis- ter, scaling and displacement can be used within the clock counts shown. however, if the effective address calculation uses two general register components, add 1 clock to the clock count shown. instruction clock count notation 1. if two clock counts are given, the smaller refers to a register operand and the larger refers to a mem- ory operand. 2. n e number of times repeated. 3. m e number of components in the next instruc- tion executed, where the entire displacement (if any) counts as one component, the entire imme- diate data (if any) counts as one component, and all other bytes of the instruction and prefix(es) each count as one component. misaligned or 32-bit operand accesses e if instructions accesses a misaligned 16-bit oper- and or 32-bit operand on even address add: 2 * clocks for read or write 4 ** clocks for read and write e if instructions accesses a 32-bit operand on odd address add: 4 * clocks for read or write 8 ** clocks for read and write wait states wait states add 1 clock per wait state to instruction execution for each data access. 80
intel386 tm sx microprocessor table 9-1. instruction set clock count summary clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode general data transfer mov e move: register to register/memory 1000100w modreg r/m 2/2 2/2 * bh register/memory to register 1000101w modreg r/m 2/4 2/4 * bh immediate to register/memory 1100011w mod000 r/m immediate data 2/2 2/2 * bh immediate to register (short form) 1011 w reg immediate data 2 2 memory to accumulator (short form) 1010000w full displacement 4 * 4 * bh accumulator to memory (short form) 1010001w full displacement 2 * 2 * bh register memory to segment register 10001110 mod sreg3 r/m 2/5 22/23 b h, i, j segment register to register/memory 10001100 mod sreg3 r/m 2/2 2/2 b h movsx e move with sign extension register from register/memory 00001111 1011111w modreg r/m 3/6 * 3/6 * bh movzx e move with zero extension register from register/memory 00001111 1011011w modreg r/m 3/6 * 3/6 * bh push e push: register/memory 11111111 mod110 r/m 5/7 * 7/9 * bh register (short form) 01010 reg 2 4 b h (short form) segment register (es, cs, ss or ds) 0 0 0 sreg 2110 2 4 b h fs or gs) segment register (es, cs, ss, ds, 00001111 10 sreg 3000 2 4 b h immediate 011010s0 immediate data 2 4 b h pusha e push all 01100000 18 34 b h pop e pop register/memory 10001111 mod000 r/m 5/7 7/9 b h register (short form) 01011 reg 6 6 b h (short form) segment register (es, cs, ss or ds) 000sreg2111 7 25 b h,i,j fs or gs segment register (es, cs, ss or ds), 00001111 10 sreg3001 7 25 b h,i,j popa e pop all 01100001 24 40 b h xchg e exchange register/memory with register 1000011w modreg r/m 3/5 ** 3/5 ** b, f f, h register with accumulator (short form) 10010 reg 8086 mode clk count virtual 33 in e input from: fixed port 1110010w port number 2 26 12 * 6 * /26 * s/t,m variable port 1110110w 2 27 13 * 7 * /27 * s/t,m out e output to: fixed port 1110011w port number 2 24 10 * 4 * /24 * s/t,m variable port 1110111w 2 25 11 * 5 * /25 * s/t,m lea e load ea to register 10001101 modreg r/m 2 2 81
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode segment control lds e load pointer to ds 11000101 modreg r/m 7 * 26 * /28 * b h,i,j les e load pointer to es 11000100 modreg r/m 7 * 26 * /28 * b h,i,j lfs e load pointer to fs 00001111 10110100 modreg r/m 7 * 29 * /31 * b h,i,j lgs e load pointer to gs 00001111 10110101 modreg r/m 7 * 26 * /28 * b h,i,j lss e load pointer to ss 00001111 10110010 modreg r/m 7 * 26 * /28 * b h,i,j flag control clc e clear carry flag 11111000 2 2 cld e clear direction flag 11111100 2 2 cli e clear interrupt enable flag 11111010 8 8 m clts e clear task switched flag 00001111 00000110 5 5 c l cmc e complement carry flag 11110101 2 2 lahf e load ah into flag 10011111 2 2 popf e pop flags 10011101 5 5 b h,n pushf e push flags 10011100 4 4 b h sahf e store ah into flags 10011110 3 3 stc e set carry flag 11111001 2 2 std e set direction flag 11111101 sti e set interrupt enable flag 11111011 8 8 m arithmetic add e add register to register 000000dw modreg r/m 2 2 register to memory 0000000w modreg r/m 7 ** 7 ** bh memory to register 0000001w modreg r/m 6 * 6 * bh immediate to register/memory 100000sw mod000 r/m immediate data 2/7 ** 2/7 ** bh immediate to accumulator (short form) 0000010w immediate data 2 2 adc e add with carry register to register 000100dw modreg r/m 2 2 register to memory 0001000w modreg r/m 7 ** 7 ** bh memory to register 0001001w modreg r/m 6 * 6 * bh immediate to register/memory 100000sw mod010 r/m immediate data 2/7 ** 2/7 ** bh immediate to accumulator (short form) 0001010w immediate data 2 2 inc e increment register/memory 1111111w mod000 r/m 2/6 ** 2/6 ** bh register (short form) 01000 reg 2 2 sub e subtract register from register 001010dw modreg r/m 2 2 82
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode arithmetic (continued) register from memory 0010100w modreg r/m 7 ** 7 ** bh memory from register 0010101w modreg r/m 6 * 6 * bh immediate from register/memory 100000sw mod101 r/m immediate data 2/7 ** 2/7 ** bh immediate from accumulator (short form) 0010110w immediate data 2 2 sbb e subtract with borrow register from register 000110dw modreg r/m 2 2 register from memory 0001100w modreg r/m 7 ** 7 ** bh memory from register 0001101w modreg r/m 6 * 6 * bh immediate from register/memory 100000sw mod011 r/m immediate data 2/7 ** 2/7 ** bh immediate from accumulator (short form) 0001110w immediate data 2 2 dec e decrement register/memory 1111111w reg001 r/m 2/6 2/6 b h register (short form) 01001 reg 2 2 cmp e compare register with register 001110dw modreg r/m 2 2 memory with register 0011100w modreg r/m 5 * 5 * bh register with memory 0011101w modreg r/m 6 * 6 * bh immediate with register/memory 100000sw mod111 r/m immediate data 2/5 * 2/5 * bh immediate with accumulator (short form) 0011110w immediate data 2 2 neg e change sign 1111011w mod011 r/m 2/6 * 2/6 * bh aaa e ascii adjust for add 00110111 4 4 aas e ascii adjust for subtract 00111111 4 4 daa e decimal adjust for add 00100111 4 4 das e decimal adjust for subtract 00101111 4 4 mul e multiply (unsigned) accumulator with register/memory 1111011w mod100 r/m multiplier-byte 1217/1520 * 1217/1520 * b, d d, h -word 1225/1528 * 1225/1528 * b, d d, h -doubleword 1241/1746 * 1241/1746 * b, d d, h imul e integer multiply (signed) accumulator with register/memory 1111011w mod101 r/m multiplier-byte 1217/1520 * 1217/1520 * b, d d, h -word 1225/1528 * 1225/1528 * b, d d, h -doubleword 1241/1746 * 1241/1746 * b, d d, h register with register/memory 00001111 10101111 modreg r/m multiplier-byte 1217/1520 * 1217/1520 * b, d d, h -word 1225/1528 * 1225/1528 * b, d d, h -doubleword 1241/1746 * 1241/1746 * b, d d, h register/memory with immediate to register 011010s1 modreg r/m immediate data -word 1326 1326/1427 b, d d, h -doubleword 1342 1342/1645 b, d d, h 83
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode arithmetic (continued) div e divide (unsigned) accumulator by register/memory 1111011w mod110 r/m divisorebyte 14/17 14/17 b,e e,h eword 22/25 22/25 b,e e,h edoubleword 38/43 38/43 b,e e,h idiv e integer divide (signed) accumulator by register/memory 1111011w mod111 r/m divisorebyte 19/22 19/22 b,e e,h eword 27/30 27/30 b,e e,h edoubleword 43/48 43/48 b,e e,h aad e ascii adjust for divide 11010101 00001010 19 19 aam e ascii adjust for multiply 11010100 00001010 17 17 cbw e convert byte to word 10011000 3 3 cwd e convert word to double word 10011001 2 2 logic shift rotate instructions not through carry (rol, ror, sal, sar, shl, and shr) register/memory by 1 1101000w modttt r/m 3/7 ** 3/7 ** bh register/memory by cl 1101001w modttt r/m 3/7 * 3/7 * bh register/memory by immediate count 1100000w modttt r/m immed 8-bit data 3/7 * 3/7 * bh through carry (rcl and rcr) register/memory by 1 1101000w modttt r/m 9/10 * 9/10 * bh register/memory by cl 1101001w modttt r/m 9/10 * 9/10 * bh register/memory by immediate count 1100000w modttt r/m immed 8-bit data 9/10 * 9/10 * bh t t t instruction 000 rol 001 ror 010 rcl 011 rcr 1 0 0 shl/sal 101 shr 111 sar shld e shift left double register/memory by immediate 00001111 10100100 modreg r/m immed 8-bit data 3/7 ** 3/7 ** register/memory by cl 00001111 10100101 modreg r/m 3/7 ** 3/7 ** shrd e shift right double register/memory by immediate 00001111 10101100 modreg r/m immed 8-bit data 3/7 ** 3/7 ** register/memory by cl 00001111 10101101 modreg r/m 3/7 ** 3/7 ** and e and register to register 001000dw modreg r/m 2 2 84
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode logic (continued) register to memory 0010000w modreg r/m 7 ** 7 ** bh memory to register 0010001w modreg r/m 6 * 6 * bh immediate to register/memory 1000000w mod100 r/m immediate data 2/7 * 2/7 ** bh immediate to accumulator (short form) 0010010w immediate data 2 2 test e and function to flags, no result register/memory and register 1000010w modreg r/m 2/5 * 2/5 * bh immediate data and register/memory 1111011w mod000 r/m immediate data 2/5 * 2/5 * bh immediate data and accumulator (short form) 1010100w immediate data 2 2 or e or register to register 000010dw modreg r/m 2 2 register to memory 0000100w modreg r/m 7 ** 7 ** bh memory to register 0000101w modreg r/m 6 * 6 * bh immediate to register/memory 1000000w mod001 r/m immediate data 2/7 ** 2/7 ** bh immediate to accumulator (short form) 0000110w immediate data 2 2 xor e exclusive or register to register 001100dw modreg r/m 2 2 register to memory 0011000w modreg r/m 7 ** 7 ** bh memory to register 0011001w modreg r/m 6 * 6 * bh immediate to register/memory 1000000w mod110 r/m immediate data 2/7 ** 2/7 ** bh immediate to accumulator (short form) 0011010w immediate data 2 2 not e invert register/memory 1111011w mod010 r/m 2/6 ** 2/6 ** bh string manipulation cmps e compare byte word 1010011w virtual count mode 8086 clk 10 * 10 * bh ins e input byte/word from dx port 0110110w 2 29 15 9 * /29 ** b s/t, h, m lods e load byte/word to al/ax/eax 1010110w 5 5 * bh movs e move byte word 1010010w 7 7 ** bh outs e output byte/word to dx port 0110111w 2 28 14 8 * /28 * b s/t, h, m scas e scan byte word 1010111w 7 * 7 * bh stos e store byte/word from al/ax/ex 1010101w 4 * 4 * bh xlat e translate string 11010111 5 * 5 * h repeated string manipulation repeated by count in cx or ecx repe cmps e compare string (find non-match) 11110011 1010011w 5 a 9n ** 5 a 9n ** bh 85
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode repeated string manipulation (continued) repne cmps e compare string (find match) 11110010 1010011w 8086 mode clk count virtual 5 a 9n ** 5 a 9n ** bh rep ins e input string 11110010 0110110w 2 13 a 6n * 7 a 6n * / b s/t, h, m 27 a 6n * rep lods e load string 11110010 1010110w 5 a 6n * 5 a 6n * bh rep movs e move string 11110010 1010010w 7 a 4n * 7 a 4n ** bh rep outs e output string 11110010 0110111w 2 12 a 5n * 6 a 5n * / b s/t, h, m 26 a 5n * repe scas e scan string (find non-al/ax/eax) 11110011 1010111w 5 a 8n * 5 a 8n * bh repne scas e scan string (find al/ax/eax) 11110010 1010111w 5 a 8n * 5 a 8n * bh rep stos e store string 11110010 1010101w 5 a 5n * 5 a 5n * bh bit manipulation bsf e scan bit forward 00001111 10111100 modreg r/m 10 a 3n * 10 a 3n ** bh bsr e scan bit reverse 00001111 10111101 modreg r/m 10 a 3n * 10 a 3n ** bh bt e test bit register/memory, immediate 00001111 10111010 mod100 r/m immed 8-bit data 3/6 * 3/6 * bh register/memory, register 00001111 10100011 modreg r/m 3/12 * 3/12 * bh btc e test bit and complement register/memory, immediate 00001111 10111010 mod111 r/m immed 8-bit data 6/8 * 6/8 * bh register/memory, register 00001111 10111011 modreg r/m 6/13 * 6/13 * bh btr e test bit and reset register/memory, immediate 00001111 10111010 mod110 r/m immed 8-bit data 6/8 * 6/8 * bh register/memory, register 00001111 10110011 modreg r/m 6/13 * 6/13 * bh bts e test bit and set register/memory, immediate 00001111 10111010 mod101 r/m immed 8-bit data 6/8 * 6/8 * bh register/memory, register 00001111 10101011 modreg r/m 6/13 * 6/13 * bh control transfer call e call direct within segment 11101000 full displacement 7 a m * 9 a m * br register/memory indirect within segment 11111111 mod010 r/m 7 a m * /10 a m * 9 a m/ b h, r 12 a m * direct intersegment 10011010 unsigned full offset, selector 17 a m * 42 a m * b j,k,r note: 2 clock count shown applies if i/o permission allows i/o to the port in virtual 8086 mode. if i/o bit map denies permission exception 13 fault occurs; refer to clock counts for int 3 instruction. 86
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode control transfer (continued) protected mode only (direct intersegment) via call gate to same privilege level 64 a m h,j,k,r via call gate to different privilege level, (no parameters) 98 a m h,j,k,r via call gate to different privilege level, (x parameters) 106 a 8x a m h,j,k,r from 286 task to 286 tss 285 h,j,k,r from 286 task to intel386 tm sx cpu tss 310 h,j,k,r from 286 task to virtual 8086 task (intel386 sx cpu tss) 229 h,j,k,r from intel386 sx cpu task to 286 tss 285 h,j,k,r from intel386 sx cpu task to intel386 sx cpu tss 392 h,j,k,r from intel386 sx cpu task to virtual 8086 task (intel386 sx cpu tss) 309 h,j,k,r indirect intersegment 11111111 mod011 r/m 30 a m46 a m b h,j,k,r protected mode only (indirect intersegment) via call gate to same privilege level 68 a m h,j,k,r via call gate to different privilege level, (no parameters) 102 a m h,j,k,r via call gate to different privilege level, (x parameters) 110 a 8x a m h,j,k,r from 286 task to 286 tss h,j,k,r from 286 task to intel386 sx cpu tss h,j,k,r from 286 task to virtual 8086 task (intel386 sx cpu tss) h,j,k,r from intel386 sx cpu task to 286 tss h,j,k,r from intel386 sx cpu task to intel386 sx cpu tss 399 h,j,k,r from intel386 sx cpu task to virtual 8086 task (intel386 sx cpu tss) h,j,k,r jmp e unconditional jump short 11101011 8-bit displacement 7 a m7 a mr direct within segment 11101001 full displacement 7 a m7 a mr within segment register/memory indirect 11111111 mod100 r/m 9 a m/14 a m9 a m/14 a m b h,r direct intersegment 11101010 unsigned full offset, selector 16 a m31 a m j,k,r protected mode only (direct intersegment) via call gate to same privilege level 53 a m h,j,k,r from 286 task to 286 tss h,j,k,r from 286 task to intel386 sx cpu tss h,j,k,r from 286 task to virtual 8086 task (intel386 sx cpu tss) h,j,k,r from intel386 sx cpu task to 286 tss h,j,k,r from intel386 sx cpu task to intel386 sx cpu tss h,j,k,r from intel386 sx cpu task to virtual 8086 task (intel386 sx cpu tss) 395 h,j,k,r indirect intersegment 11111111 mod101 r/m 17 a m31 a m b h,j,k,r protected mode only (indirect intersegment) via call gate to same privilege level 49 a m h,j,k,r from 286 task to 286 tss h,j,k,r from 286 task to intel386 sx cpu tss h,j,k,r from 286 task to virtual 8086 task (intel386 sx cpu tss) h,j,k,r from intel386 sx cpu task to 286 tss h,j,k,r from intel386 sx cpu task to intel386 sx cpu tss 328 h,j,k,r from intel386 sx cpu task to virtual 8086 task (intel386 sx cpu tss) h,j,k,r 87
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode control transfer (continued) ret e return from call: within segment 11000011 12 a m b g, h, r within segment adding immediate to sp 11000010 16-bit displ 12 a m b g, h, r intersegment 11001011 36 a m b g, h, j, k, r intersegment adding immediate to sp 11001010 16-bit displ 36 a m b g, h, j, k, r protected mode only (ret): to different privilege level intersegment 72 h, j, k, r intersegment adding immediate to sp 72 h, j, k, r conditional jumps note: times are jump ``taken or not taken'' jo e jump on overflow 8-bit displacement 01110000 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000000 full displacement 7 a mor3 7 a mor3 r jno e jump on not overflow 8-bit displacement 01110001 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000001 full displacement 7 a mor3 7 a mor3 r jb/jnae e jump on below/not above or equal 8-bit displacement 01110010 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000010 full displacement 7 a mor3 7 a mor3 r jnb/jae e jump on not below/above or equal 8-bit displacement 01110011 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000011 full displacement 7 a mor3 7 a mor3 r je/jz e jump on equal/zero 8-bit displacement 01110100 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000100 full displacement 7 a mor3 7 a mor3 r jne/jnz e jump on not equal/not zero 8-bit displacement 01110101 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000101 full displacement 7 a mor3 7 a mor3 r jbe/jna e jump on below or equal/not above 8-bit displacement 01110110 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000110 full displacement 7 a mor3 7 a mor3 r jnbe/ja e jump on not below or equal/above 8-bit displacement 01110111 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10000111 full displacement 7 a mor3 7 a mor3 r js e jump on sign 8-bit displacement 01111000 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001000 full displacement 7 a mor3 7 a mor3 r 88
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode conditional jumps (continued) jns e jump on not sign 8-bit displacement 01111001 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001001 full displacement 7 a mor3 7 a mor3 r jp/jpe e jump on parity/parity even 8-bit displacement 01111010 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001010 full displacement 7 a mor3 7 a mor3 r jnp/jpo e jump on not parity/parity odd 8-bit displacement 01111011 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001011 full displacement 7 a mor3 7 a mor3 r jl/jnge e jump on less/not greater or equal 8-bit displacement 01111100 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001100 full displacement 7 a mor3 7 a mor3 r jnl/jge e jump on not less/greater or equal 8-bit displacement 01111101 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001101 full displacement 7 a mor3 7 a mor3 r jle/jng e jump on less or equal/not greater 8-bit displacement 01111110 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001110 full displacement 7 a mor3 7 a mor3 r jnle/jg e jump on not less or equal/greater 8-bit displacement 01111111 8-bit displ 7 a mor3 7 a mor3 r full displacement 00001111 10001111 full displacement 7 a mor3 7 a mor3 r jcxz e jump on cx zero 11100011 8-bit displ 9 a mor5 9 a mor5 r jecxz e jump on ecx zero 11100011 8-bit displ 9 a mor5 9 a mor5 r (address size prefix differentiates jcxz from jecxz) loop e loop cx times 11100010 8-bit displ 11 a m11 a mr loopz/loope e loop with zero/equal 11100001 8-bit displ 11 a m11 a mr loopnz/loopne e loop while not zero 11100000 8-bit displ 11 a m11 a mr conditional byte set note: times are register/memory seto e set byte on overflow to register/memory 00001111 10010000 mod000 r/m 4/5 * 4/5 * h setno e set byte on not overflow to register/memory 00001111 10010001 mod000 r/m 4/5 * 4/5 * h setb/setnae e set byte on below/not above or equal to register/memory 00001111 10010010 mod000 r/m 4/5 * 4/5 * h 89
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode conditional byte set (continued) setnb e set byte on not below/above or equal to register/memory 00001111 10010011 mod000 r/m 4/5 * 4/5 * h sete/setz e set byte on equal/zero to register/memory 00001111 10010100 mod000 r/m 4/5 * 4/5 * h setne/setnz e set byte on not equal/not zero to register/memory 00001111 10010101 mod000 r/m 4/5 * 4/5 * h setbe/setna e set byte on below or equal/not above to register/memory 00001111 10010110 mod000 r/m 4/5 * 4/5 * h setnbe/seta e set byte on not below or equal/above to register/memory 00001111 10010111 mod000 r/m 4/5 * 4/5 * h sets e set byte on sign to register/memory 00001111 10011000 mod000 r/m 4/5 * 4/5 * h setns e set byte on not sign to register/memory 00001111 10011001 mod000 r/m 4/5 * 4/5 * h setp/setpe e set byte on parity/parity even to register/memory 00001111 10011010 mod000 r/m 4/5 * 4/5 * h setnp/setpo e set byte on not parity/parity odd to register/memory 00001111 10011011 mod000 r/m 4/5 * 4/5 * h setl/setnge e set byte on less/not greater or equal to register/memory 00001111 10011100 mod000 r/m 4/5 * 4/5 * h setnl/setge e set byte on not less/greater or equal to register/memory 00001111 01111101 mod000 r/m 4/5 * 4/5 * h setle/setng e set byte on less or equal/not greater to register/memory 00001111 10011110 mod000 r/m 4/5 * 4/5 * h setnle/setg e set byte on not less or equal/greater to register/memory 00001111 10011111 mod000 r/m 4/5 * 4/5 * h enter e enter procedure 11001000 16-bit displacement, 8-bit level l e 0 10 10 b h l e 1 14 14 b h l l 1 17 a 17 a bh 8(n b 1) 8(n b 1) leave e leave procedure 11001001 4 4 b h 90
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode interrupt instructions int e interrupt: type specified 11001101 type 37 b type 3 11001100 33 b into e interrupt 4 if overflow flag set 11001110 if of e 1 35 b, e if of e 0 3 3 b, e bound e interrupt 5 if detect value 01100010 modreg r/m out of range if out of range 44 b,e e,g,h,j,k,r if in range 10 10 b,e e,g,h,j,k,r protected mode only (int) int: type specified via interrupt or trap gate via interrupt or trap gate to same privilege level 71 g, j, k, r to different privilege level 111 g, j, k, r from 286 task to 286 tss via task gate 438 g, j, k, r from 286 task to intel386 tm sx cpu tss via task gate 465 g, j, k, r from 286 task to virt 8086 md via task gate 382 g, j, k, r from intel386 tm sx cpu task to 286 tss via task gate 440 g, j, k, r from intel386 tm sx cpu task to intel386 tm sx cpu tss via task gate 467 g, j, k, r from intel386 tm sx cpu task to virt 8086 md via task gate 384 g, j, k, r from virt 8086 md to 286 tss via task gate 445 g, j, k, r from virt 8086 md to intel386 tm sx cpu tss via task gate 472 g, j, k, r from virt 8086 md to priv level 0 via trap gate or interrupt gate 275 int: type 3 via interrupt or trap gate to same privilege level 71 g, j, k, r via interrupt or trap gate to different privilege level 111 g, j, k, r from 286 task to 286 tss via task gate 382 g, j, k, r from 286 task to intel386 tm sx cpu tss via task gate 409 g, j, k, r from 286 task to virt 8086 md via task gate 326 g, j, k, r from intel386 tm sx cpu task to 286 tss via task gate 384 g, j, k, r from intel386 tm sx cpu task to intel386 tm sx cpu tss via task gate 411 g, j, k, r from intel386 tm sx cpu task to virt 8086 md via task gate 328 g, j, k, r from virt 8086 md to 286 tss via task gate 389 g, j, k, r from virt 8086 md to intel386 tm sx cpu tss via task gate 416 g, j, k, r from virt 8086 md to priv level 0 via trap gate or interrupt gate 223 into: via interrupt or trap grate to same privilege level 71 g, j, k, r via interrupt or trap gate to different privilege level 111 g, j, k, r from 286 task to 286 tss via task gate 384 g, j, k, r from 286 task to intel386 tm sx cpu tss via task gate 411 g, j, k, r from 286 task to virt 8086 md via task gate 328 g, j, k, r from intel386 tm sx cpu task to 286 tss via task gate intel386 dx g, j, k, r from intel386 tm sx cpu task to intel386 tm sx cpu tss via task gate 413 g, j, k, r from intel386 tm sx cpu task to virt 8086 md via task gate 329 g, j, k, r from virt 8086 md to 286 tss via task gate 391 g, j, k, r from virt 8086 md to intel386 tm sx cpu tss via task gate 418 g, j, k, r from virt 8086 md to priv level 0 via trap gate or interrupt gate 223 91
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode interrupt instructions (continued) bound: via interrupt or trap gate to same privilege level 71 g, j, k, r via interrupt or trap gate to different privilege level 111 g, j, k, r from 286 task to 286 tss via task gate 358 g, j, k, r from 286 task to intel386 tm sx cpu tss via task gate 388 g, j, k, r from 268 task to virt 8086 mode via task gate 335 g, j, k, r from intel386 sx cpu task to 286 tss via task gate 368 g, j, k, r from intel386 sx cpu task to intel386 sx cpu tss via task gate 398 g, j, k, r from intel386 sx cpu task to virt 8086 mode via task gate 347 g, j, k, r, from virt 8086 mode to 286 tss via task gate 368 g, j, k, r from virt 8086 mode to intel386 sx cpu tss via task gate 398 g, j, k, r from virt 8086 md to priv level 0 via trap gate or interrupt gate 223 interrupt return iret e interrupt return 11001111 24 g,h,j,k,r protected mode only (iret) to the same privilege level (within task) 42 g, h, j, k, r to different privilege level (within task) 86 g, h, j, k, r from 286 task to 286 tss 285 h, j, k, r from 286 task to intel386 sx cpu tss 318 h, j, k, r from 286 task to virtual 8086 task 267 h, j, k, r from 286 task to virtual 8086 mode (within task) 113 from intel386 sx cpu task to 286 tss 324 h, j, k, r from intel386 sx cpu task to intel386 sx cpu tss 328 h, j, k, r from intel386 sx cpu task to virtual 8086 task 377 h, j, k, r from intel386 sx cpu task to virtual 8086 mode (within task) 113 processor control hlt e halt 11110100 5 5 l mov e move to and from control/debug/test registers cr0/cr2/cr3 from register 00001111 00100010 11eeereg 10/4/5 10/4/5 l register from cr03 00001111 00100000 11eeereg 6 6 l dr03 from register 00001111 00100011 11eeereg 22 22 l dr67 from register 00001111 00100011 11eeereg 16 16 l register from dr67 00001111 00100001 11eeereg 14 14 l register from dr03 00001111 00100001 11eeereg 22 22 l tr67 from register 00001111 00100110 11eeereg 12 12 l register from tr67 00001111 00100100 11eeereg 12 12 l nop e no operation 10010000 3 3 wait e wait until busy y pin is negated 10011011 6 6 92
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode processor extension instructions processor extension escape 11011ttt modlll r/m see h ttt and lll bits are opcode intel387sx information for coprocessor. data sheet for clock counts prefix bytes address size prefix 01100111 0 0 lock e bus lock prefix 11110000 0 0 m operand size prefix 01100110 0 0 segment override prefix cs: 00101110 0 0 ds: 00111110 0 0 es: 00100110 0 0 fs: 01100100 0 0 gs: 01100101 0 0 ss: 00110110 0 0 protection control arpl e adjust requested privilege level from register/memory 01100011 modreg r/m n/a 20/21 ** ah lar e load access rights from register/memory 00001111 00000010 modreg r/m n/a 15/16 * a g,h,j,p lgdt e load global descriptor table register 00001111 00000001 mod010 r/m 11 * 11 * b, c h, l lidt e load interrupt descriptor table register 00001111 00000001 mod011 r/m 11 * 11 * b, c h, l lldt e load local descriptor table register to register/memory 00001111 00000000 mod010 r/m n/a 20/24 * a g,h,j,l lmsw e load machine status word from register/memory 00001111 00000001 mod110 r/m 10/13 10/13 * b, c h, l lsl e load segment limit from register/memory 00001111 00000011 modreg r/m byte-granular limit n/a 20/21 * a g,h,j,p page-granular limit n/a 25/26 * a g,h,j,p ltr e load task register from register/memory 00001111 00000000 mod001 r/m n/a 23/27 * a g,h,j,l sgdt e store global descriptor table register 00001111 00000001 mod000 r/m 9 * 9 * b, c h sidt e store interrupt descriptor table register 00001111 00000001 mod001 r/m 9 * 9 * b, c h sldt e store local descriptor table register to register/memory 00001111 00000000 mod000 r/m n/a 2/2 * ah 93
intel386 tm sx microprocessor table 9-1. instruction set clock count summary (continued) clock count notes real real instruction format address protected address protected mode or virtual mode or virtual virtual address virtual address 8086 mode 8086 mode mode mode protection control (continued) smsw e store machine status word 00001111 00000001 mod100 r/m 2/2 * 2/2 * b, c h, l str e store task register to register/memory 00001111 00000000 mod001 r/m n/a 2/2 * ah verr e verify read access register/memory 00001111 00000000 mod100 r/m n/a 10/11 * a g,h,j,p verw e verify write access 00001111 00000000 mod101 r/m n/a 15/16 * a g,h,j,p instruction notes for table 9-1 notes a through c apply to real address mode only: a. this is a protected mode instruction. attempted execution in real mode will result in exception 6 (invalid opcode). b. exception 13 fault (general protection) will occur in real mode if an operand reference is made that partially or fully extends beyond the maximum cs, ds, es, fs or gs limit, ffffh. exception 12 fault (stack segment limit violation or not present) will occur in real mode if an operand reference is made that partially or fully extends beyond the maximum ss limit. c. this instruction may be executed in real mode. in real mode, its purpose is primarily to initialize the cpu for protected mode. notes d through g apply to real address mode and protected virtual address mode: d. the intel386 sx cpu uses an early-out multiply algorithm. the actual number of clocks depends on the position of the most significant bit in the operand (multiplier). clock counts given are minimum to maximum. to calculate actual clocks use the following formula: actual clock e if m kl 0 then max ( [ log 2 l m l ] ,3) a b clocks: if m e 0 then 3 a b clocks in this formula, m is the multiplier, and b e 9 for register to register, b e 12 for memory to register, b e 10 for register with immediate to register, b e 11 for memory with immediate to register. e. an exception may occur, depending on the value of the operand. f. lock y is automatically asserted, regardless of the presence or absence of the lock y prefix. g. lock y is asserted during descriptor table accesses. notes h through s/t apply to protected virtual address mode only: h. exception 13 fault (general protection violation) will occur if the memory operand in cs, ds, es, fs or gs cannot be used due to either a segment limit violation or access rights violation. if a stack limit is violated, an exception 12 (stack segment limit violation or not present) occurs. i. for segment load operations, the cpl, rpl, and dpl must agree with the privilege rules to avoid an exception 13 fault (general protection violation). the segment's descriptor must indicate ``present'' or exception 11 (cs, ds, es, fs, gs not present). if the ss register is loaded and a stack segment not present is detected, an exception 12 (stack segment limit violation or not present) occurs. j. all segment descriptor accesses in the gdt or ldt made by this instruction will automatically assert lock y to maintain descriptor integrity in multiprocessor systems. k. jmp, call, int, ret and iret instructions referring to another code segment will cause an exception 13 (general protection violation) if an applicable privilege rule is violated. l. an exception 13 fault occurs if cpl is greater than 0 (0 is the most privileged level). m. an exception 13 fault occurs if cpl is greater than iopl. n. the if bit of the flag register is not updated if cpl is greater than iopl. the iopl and vm fields of the flag register are updated only if cpl e 0. o. the pe bit of the msw (cr0) cannot be reset by this instruction. use mov into cr0 if desiring to reset the pe bit. p. any violation of privilege rules as applied to the selector operand does not cause a protection exception; rather, the zero flag is cleared. q. if the coprocessor's memory operand violates a segment limit or segment access rights, an exception 13 fault (general protection exception) will occur before the esc instruction is executed. an exception 12 fault (stack segment limit violation or not present) will occur if the stack limit is violated by the operand's starting address. r. the destination of a jmp, call, int, ret or iret must be in the defined limit of a code segment or an exception 13 fault (general protection violation) will occur. s/t. the instruction will execute in s clocks if cpl s iopl. if cpl l iopl, the instruction will take t clocks. 94
intel386 tm sx microprocessor 9.2 instruction encoding 9.2.1 overview all instruction encodings are subsets of the general instruction format shown in figure 8-1. instructions consist of one or two primary opcode bytes, possibly an address specifier consisting of the ``mod r/m'' byte and ``scaled index'' byte, a displacement if re- quired, and an immediate data field if required. within the primary opcode or opcodes, smaller en- coding fields may be defined. these fields vary ac- cording to the class of operation. the fields define such information as direction of the operation, size of the displacements, register encoding, or sign ex- tension. almost all instructions referring to an operand in memory have an addressing mode byte following the primary opcode byte(s). this byte, the mod r/m byte, specifies the address mode to be used. certain encodings of the mod r/m byte indicate a second addressing byte, the scale-index-base byte, follows the mod r/m byte to fully specify the addressing mode. addressing modes can include a displacement im- mediately following the mod r/m byte, or scaled in- dex byte. if a displacement is present, the possible sizes are 8, 16 or 32 bits. if the instruction specifies an immediate operand, the immediate operand follows any displacement bytes. the immediate operand, if specified, is always the last field of the instruction. figure 9-1 illustrates several of the fields that can appear in an instruction, such as the mod field and the r/m field, but the figure does not show all fields. several smaller fields also appear in certain instruc- tions, sometimes within the opcode bytes them- selves. table 9-2 is a complete list of all fields ap- pearing in the instruction set. further ahead, follow- ing table 9-2, are detailed tables for each field. tttttttt tttttttt modtttr/m ss index base d32 l 16 l 8 l none data32 l 16 l 8 l none 7 0 7 0 765320 765320 x ? yx ? yx ? yx ? yx ? y opcode ``mod r/m'' ``s-i-b'' address immediate (one or two bytes) byte byte displacement data x ? y (t represents an (4, 2, 1 bytes (4, 2, 1 bytes opcode bit.) register and address or none) or none) mode specifier figure 9-1. general instruction format table 9-2. fields within instructions field name description number of bits w specifies if data is byte or full size (full size is either 16 or 32 bits 1 d specifies direction of data operation 1 s specifies if an immediate data field must be sign-extended 1 reg general register specifier 3 mod r/m address mode specifier (effective address can be a general register) 2 for mod; 3 for r/m ss scale factor for scaled index address mode 2 index general register to be used as index register 3 base general register to be used as base register 3 sreg2 segment register specifier for cs, ss, ds, es 2 sreg3 segment register specifier for cs, ss, ds, es, fs, gs 3 tttn for conditional instructions, specifies a condition asserted or a condition negated 4 note: table 9-1 shows encoding of individual instructions. 95
intel386 tm sx microprocessor 9.2.2 32-bit extensions of the instruction set with the intel386 sx cpu, the 8086/80186/80286 instruction set is extended in two orthogonal direc- tions: 32-bit forms of all 16-bit instructions are added to support the 32-bit data types, and 32-bit address- ing modes are made available for all instructions ref- erencing memory. this orthogonal instruction set ex- tension is accomplished having a default (d) bit in the code segment descriptor, and by having 2 prefix- es to the instruction set. whether the instruction defaults to operations of 16 bits or 32 bits depends on the setting of the d bit in the code segment descriptor, which gives the de- fault length (either 32 bits or 16 bits) for both oper- ands and effective addresses when executing that code segment. in the real address mode or virtual 8086 mode, no code segment descriptors are used, but a d value of 0 is assumed internally by the intel386 sx cpu when operating in those modes (for 16-bit default sizes compatible with the 8086/ 80186/80286). two prefixes, the operand size prefix and the effec- tive address size prefix, allow overriding individually the default selection of operand size and effective address size. these prefixes may precede any op- code bytes and affect only the instruction they pre- cede. if necessary, one or both of the prefixes may be placed before the opcode bytes. the presence of the operand size prefix and the effective address prefix will toggle the operand size or the effective address size, respectively, to the value ``opposite'' from the default setting. for example, if the default operand size is for 32-bit data operations, then pres- ence of the operand size prefix toggles the instruc- tion to 16-bit data operation. as another example, if the default effective address size is 16 bits, pres- ence of the effective address size prefix toggles the instruction to use 32-bit effective address computa- tions. these 32-bit extensions are available in all modes, including the real address mode or the virtual 8086 mode. in these modes the default is always 16 bits, so prefixes are needed to specify 32-bit operands or addresses. for instructions with more than one pre- fix, the order of prefixes is unimportant. unless specified otherwise, instructions with 8-bit and 16-bit operands do not affect the contents of the high-order bits of the extended registers. 9.2.3 encoding of instruction fields within the instruction are several fields indicating register selection, addressing mode and so on. the exact encodings of these fields are defined immedi- ately ahead. 9.2.3.1 encoding of operand length (w) field for any given instruction performing a data opera- tion, the instruction is executing as a 32-bit operation or a 16-bit operation. within the constraints of the operation size, the w field encodes the operand size as either one byte or the full operation size, as shown in the table below. operand size operand size w field during 16-bit during 32-bit data operations data operations 0 8 bits 8 bits 1 16 bits 32 bits 9.2.3.2 encoding of the general register (reg) field the general register is specified by the reg field, which may appear in the primary opcode bytes, or as the reg field of the ``mod r/m'' byte, or as the r/m field of the ``mod r/m'' byte. encoding of reg field when w field is not present in instruction register selected register selected reg field during 16-bit during 32-bit data operations data operations 000 ax eax 001 cx ecx 010 dx edx 011 bx ebx 100 sp esp 101 bp ebp 101 si esi 101 di edi encoding of reg field when w field is present in instruction register specified by reg field during 16-bit data operations: reg function of w field (when w e 0) (when w e 1) 000 al ax 001 cl cx 010 dl dx 011 bl bx 100 ah sp 101 ch bp 110 dh si 111 bh di 96
intel386 tm sx microprocessor register specified by reg field during 32-bit data operations reg function of w field (when w e 0) (when w e 1) 000 al eax 001 cl ecx 010 dl edx 011 bl ebx 100 ah esp 101 ch ebp 110 dh esi 111 bh edi 9.2.3.3 encoding of the segment register (sreg) field the sreg field in certain instructions is a 2-bit field allowing one of the four 80286 segment registers to be specified. the sreg field in other instructions is a 3-bit field, allowing the intel386 sx cpu fs and gs segment registers to be specified. 2-bit sreg2 field 2-bit segment sreg2 field register selected 00 es 01 cs 10 ss 11 ds 3-bit sreg3 field 3-bit segment sreg3 field register selected 000 es 001 cs 010 ss 011 ds 100 fs 101 gs 110 do not use 111 do not use 9.2.3.4 encoding of address mode except for special instructions, such as push or pop, where the addressing mode is pre-determined, the addressing mode for the current instruction is specified by addressing bytes following the primary opcode. the primary addressing byte is the ``mod r/m'' byte, and a second byte of addressing informa- tion, the ``s-i-b'' (scale-index-base) byte, can be specified. the s-i-b byte (scale-index-base byte) is specified when using 32-bit addressing mode and the ``mod r/m'' byte has r/m e 100 and mod e 00, 01 or 10. when the sib byte is present, the 32-bit addressing mode is a function of the mod, ss, index, and base fields. the primary addressing byte, the ``mod r/m'' byte, also contains three bits (shown as ttt in figure 8-1) sometimes used as an extension of the primary op- code. the three bits, however, may also be used as a register field (reg). when calculating an effective address, either 16-bit addressing or 32-bit addressing is used. 16-bit ad- dressing uses 16-bit address components to calcu- late the effective address while 32-bit addressing uses 32-bit address components to calculate the ef- fective address. when 16-bit addressing is used, the ``mod r/m'' byte is interpreted as a 16-bit addressing mode specifier. when 32-bit addressing is used, the ``mod r/m'' byte is interpreted as a 32-bit addressing mode specifier. tables on the following three pages define all en- codings of all 16-bit addressing modes and 32-bit addressing modes. 97
intel386 tm sx microprocessor encoding of 16-bit address mode with ``mod r/m'' byte mod r/m effective address 00 000 ds: [ bx a si ] 00 001 ds: [ bx a di ] 00 010 ss: [ bp a si ] 00 011 ss: [ bp a di ] 00 100 ds: [ si ] 00 101 ds: [ di ] 00 110 ds:d16 00 111 ds: [ bx ] 01 000 ds: [ bx a si a d8 ] 01 001 ds: [ bx a di a d8 ] 01 010 ss: [ bp a si a d8 ] 01 011 ss: [ bp a di a d8 ] 01 100 ds: [ si a d8 ] 01 101 ds: [ di a d8 ] 01 110 ss: [ bp a d8 ] 01 111 ds: [ bx a d8 ] mod r/m effective address 10 000 ds: [ bx a si a d16 ] 10 001 ds: [ bx a di a d16 ] 10 010 ss: [ bp a si a d16 ] 10 011 ss: [ bp a di a d16 ] 10 100 ds: [ si a d16 ] 10 101 ds: [ di a d16 ] 10 110 ss: [ bp a d16 ] 10 111 ds: [ bx a d16 ] 11 000 registeresee below 11 001 registeresee below 11 010 registeresee below 11 011 registeresee below 11 100 registeresee below 11 101 registeresee below 11 110 registeresee below 11 111 registeresee below register specified by r/m during 16-bit data operations mod r/m function of w field (when w e 0) (when w e 1) 11 000 al ax 11 001 cl cx 11 010 dl dx 11 011 bl bx 11 100 ah sp 11 101 ch bp 11 110 dh si 11 111 bh di register specified by r/m during 32-bit data operations mod r/m function of w field (when w e 0) (when w e 1) 11 000 al eax 11 001 cl ecx 11 010 dl edx 11 011 bl ebx 11 100 ah esp 11 101 ch ebp 11 110 dh esi 11 111 bh edi 98
intel386 tm sx microprocessor encoding of 32-bit address mode with ``mod r/m'' byte (no ``s-i-b'' byte present): mod r/m effective address 00 000 ds: [ eax ] 00 001 ds: [ ecx ] 00 010 ds: [ edx ] 00 011 ds: [ ebx ] 00 100 s-i-b is present 00 101 ds:d32 00 110 ds: [ esi ] 00 111 ds: [ edi ] 01 000 ds: [ eax a d8 ] 01 001 ds: [ ecx a d8 ] 01 010 ds: [ edx a d8 ] 01 011 ds: [ ebx a d8 ] 01 100 s-i-b is present 01 101 ss: [ ebp a d8 ] 01 110 ds: [ esi a d8 ] 01 111 ds: [ edi a d8 ] mod r/m effective address 10 000 ds: [ eax a d32 ] 10 001 ds: [ ecx a d32 ] 10 010 ds: [ edx a d32 ] 10 011 ds: [ ebx a d32 ] 10 100 s-i-b is present 10 101 ss: [ ebp a d32 ] 10 110 ds: [ esi a d32 ] 10 111 ds: [ edi a d32 ] 11 000 registeresee below 11 001 registeresee below 11 010 registeresee below 11 011 registeresee below 11 100 registeresee below 11 101 registeresee below 11 110 registeresee below 11 111 registeresee below register specified by reg or r/m during 16-bit data operations: mod r/m function of w field (when w e 0) (when w e 1) 11 000 al ax 11 001 cl cx 11 010 dl dx 11 011 bl bx 11 100 ah sp 11 101 ch bp 11 110 dh si 11 111 bh di register specified by reg or r/m during 32-bit data operations: mod r/m function of w field (when w e 0) (when w e 1) 11 000 al eax 11 001 cl ecx 11 010 dl edx 11 011 bl ebx 11 100 ah esp 11 101 ch ebp 11 110 dh esi 11 111 bh edi 99
intel386 tm sx microprocessor encoding of 32-bit address mode (``mod r/m'' byte and ``s-i-b'' byte present): mod base effective address 00 000 ds: [ eax a (scaled index) ] 00 001 ds: [ ecx a (scaled index) ] 00 010 ds: [ edx a (scaled index) ] 00 011 ds: [ ebx a (scaled index) ] 00 100 ss: [ esp a (scaled index) ] 00 101 ds: [ d32 a (scaled index) ] 00 110 ds: [ esi a (scaled index) ] 00 111 ds: [ edi a (scaled index) ] 01 000 ds: [ eax a (scaled index) a d8 ] 01 001 ds: [ ecx a (scaled index) a d8 ] 01 010 ds: [ edx a (scaled index) a d8 ] 01 011 ds: [ ebx a (scaled index) a d8 ] 01 100 ss: [ esp a (scaled index) a d8 ] 01 101 ss: [ ebp a (scaled index) a d8 ] 01 110 ds: [ esi a (scaled index) a d8 ] 01 111 ds: [ edi a (scaled index) a d8 ] 10 000 ds: [ eax a (scaled index) a d32 ] 10 001 ds: [ ecx a (scaled index) a d32 ] 10 010 ds: [ edx a (scaled index) a d32 ] 10 011 ds: [ ebx a (scaled index) a d32 ] 10 100 ss: [ esp a (scaled index) a d32 ] 10 101 ss: [ ebp a (scaled index) a d32 ] 10 110 ds: [ esi a (scaled index) a d32 ] 10 111 ds: [ edi a (scaled index) a d32 ] note: mod field in ``mod r/m'' byte; ss, index, base fields in ``s-i-b'' byte. ss scale factor 00 x1 01 x2 10 x4 11 x8 index index register 000 eax 001 ecx 010 edx 011 ebx 100 no index reg ** 101 ebp 110 esi 111 edi ** important note: when index field is 100, indicating ``no index register,'' then ss field must equal 00. if index is 100 and ss does not equal 00, the effective address is undefined. 100
intel386 tm sx microprocessor 9.2.3.5 encoding of operation direction (d) field in many two-operand instructions the d field is pres- ent to indicate which operand is considered the source and which is the destination. d direction of operation 0 register/memory k - - register ``reg'' field indicates source operand; ``mod r/m'' or ``mod ss index base'' indicates destination operand 1 register k - - register/memory ``reg'' field indicates destination operand; ``mod r/m'' or ``mod ss index base'' indicates source operand 9.2.3.6 encoding of sign-extend (s) field the s field occurs primarily to instructions with im- mediate data fields. the s field has an effect only if the size of the immediate data is 8 bits and is being placed in a 16-bit or 32-bit destination. s effect on effect on immediate data8 immediate data 16 l 32 0 none none 1 sign-extend data8 none to fill 16-bit or 32-bit destination 9.2.3.7 encoding of conditional test (tttn) field for the conditional instructions (conditional jumps and set on condition), tttn is encoded with n indicat- ing to use the condition (n e 0) or its negation (n e 1), and ttt giving the condition to test. mnemonic condition tttn o overflow 0000 no no overflow 0001 b/nae below/not above or equal 0010 nb/ae not below/above or equal 0011 e/z equal/zero 0100 ne/nz not equal/not zero 0101 be/na below or equal/not above 0110 nbe/a not below or equal/above 0111 s sign 1000 ns not sign 1001 p/pe parity/parity even 1010 np/po not parity/parity odd 1011 l/nge less than/not greater or equal 1100 nl/ge not less than/greater or equal 1101 le/ng less than or equal/greater than 1110 nle/g not less or equal/greater than 1111 9.2.3.8 encoding of control or debug or test register (eee) field for the loading and storing of the control, debug and test registers. when interpreted as control register field eee code reg name 000 cr0 010 cr2 011 cr3 do not use any other encoding when interpreted as debug register field eee code reg name 000 dr0 001 dr1 010 dr2 011 dr3 110 dr6 111 dr7 do not use any other encoding when interpreted as test register field eee code reg name 110 tr6 111 tr7 do not use any other encoding 101
intel386 tm sx microprocessor data sheet revision review the following list represents key differences between this data sheet and the -007 version of the intel386 tm sx microprocessor data sheet. please review the summary carefully. 1. table 5.7, e-step revision identifier is added. 2. table 7.3, i cc supply current for clk2 e 40 mhz with 20 mhz intel386 sx has a typical i cc of 180 ma. 3. table 7.5, t 4 clk2 fall time and t 5 clk2 rise time have no minimum time for all speeds but maximum time for all speeds is 8 ns. 4. figure 7.11, chmos iii characteristics for typical i cc has been taken out. 102


▲Up To Search▲   

 
Price & Availability of NG80386SXLP33

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X